我们一直在升级我们的前端,它已经使用 Kendo UI for jQuery 和他们新发布的 React 组件。
我们现有的组件之一是包含一些按钮和下拉菜单的工具栏,但到目前为止,您似乎只能使用 React 工具栏自己的配置对象来渲染工具栏内的任何内容。这是限制使用。
是否可以在 Kendo UI React 工具栏中使用其他 Kendo UI React 组件甚至您自己的 React 组件?
我们一直在升级我们的前端,它已经使用 Kendo UI for jQuery 和他们新发布的 React 组件。
我们现有的组件之一是包含一些按钮和下拉菜单的工具栏,但到目前为止,您似乎只能使用 React 工具栏自己的配置对象来渲染工具栏内的任何内容。这是限制使用。
是否可以在 Kendo UI React 工具栏中使用其他 Kendo UI React 组件甚至您自己的 React 组件?
Toolbar 是 jQuery kendo UI Toolbar 的 React 包装器。因此,不可能在其中添加反应组件。 https://www.telerik.com/kendo-react-ui/wrappers/buttons/toolbar/
该套件现在已扩展为具有完全在 React 上编写的组件,并且它们可以相互嵌套。 https://www.telerik.com/kendo-react-ui/components/buttons/
纯实现没有工具栏,但它有 ButtonGroup,工具栏的其余部分只是样式,并且由于它使用相同的主题,您可以通过设置一些 classNames 来实现。
<div className="k-toolbar k-widget k-toolbar-resizable">
<ButtonGroup width="300px">
<Button togglable={true} icon="bold">Bold</Button>
<Button togglable={true} icon="italic">Italic</Button>
<Button togglable={true} icon="underline">Underline</Button>
</ButtonGroup >
<div data-overflow="auto" className="k-separator"> </div>
<Button icon="bold">Bold</Button>
</div>