[英]React Kendo UI TreeView throws 'kendo is not defined'
I am working on a React project with Kendo UI. 我正在与Kendo UI一起开展React项目。 I followed the steps from Kendo UI TreeView
我按照Kendo UI TreeView的步骤进行操作
I have installed @progress/kendo-treeview-react-wrapper
, @progress/kendo-ui
and imported theme into my project using import '@progress/kendo-theme-material/dist/all.css';
我使用
import '@progress/kendo-theme-material/dist/all.css';
@progress/kendo-treeview-react-wrapper
, @progress/kendo-ui
和导入的主题安装到我的项目中import '@progress/kendo-theme-material/dist/all.css';
When I use KendoUI buttons, everything is working, the functionality and theme are expected, but it throws below Error when use TreeView
当我使用KendoUI按钮时,一切正常,功能和主题是预期的,但在使用
TreeView
时它会抛出Error
Uncaught ReferenceError: kendo is not defined
at TreeView.componentDidMount (bundle.js:69556)
at commitLifeCycles (bundle.js:12471)
at commitAllLifeCycles (bundle.js:14142)
at HTMLUnknownElement.callCallback (bundle.js:2787)
at Object.invokeGuardedCallbackDev (bundle.js:2825)
at invokeGuardedCallback (bundle.js:2874)
at commitRoot (bundle.js:14281)
at completeRoot (bundle.js:15189)
at performWorkOnRoot (bundle.js:15139)
at performWork (bundle.js:15057)
bundle.js:12330 The above error occurred in the <TreeView> component:
in TreeView (created by AssetsStatusTreeView)
in div (created by AssetsStatusTreeView)
in AssetsStatusTreeView (created by Connect(AssetsStatusTreeView))
in Connect(AssetsStatusTreeView) (created by Route)
in Route
in Switch
in Router (created by BrowserRouter)
in BrowserRouter
in Provider
Uncaught TypeError: Cannot read property 'call' of undefined
at TreeView.KendoBaseComponent.componentWillUnmount (bundle.js:69569)
at callComponentWillUnmountWithTimer (bundle.js:12390)
at HTMLUnknownElement.callCallback (bundle.js:2787)
at Object.invokeGuardedCallbackDev (bundle.js:2825)
at invokeGuardedCallback (bundle.js:2874)
at safelyCallComponentWillUnmount (bundle.js:12397)
at commitUnmount (bundle.js:12643)
at unmountHostComponents (bundle.js:12986)
at commitDeletion (bundle.js:13016)
at commitAllHostEffects (bundle.js:14100)
Can anyone help? 有人可以帮忙吗? Thanks!
谢谢!
The instructions from Kendo React is : 来自Kendo React的说明是:
There's one more step to do, we need import @progress/kendo-ui
explicitly: 还有一个步骤要做,我们需要明确地导入
@progress/kendo-ui
:
import kendo from '@progress/kendo-ui';
The Plunker Examples from KendoUI helps me figure it out. 来自KendoUI的Plunker示例帮助我弄清楚了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.