gpt4 book ai didi

kendo-ui - kendo UI Treeview 抛出异常 - r.Dragging 不是函数

转载 作者:行者123 更新时间:2023-12-03 22:52:21 25 4
gpt4 key购买 nike

我正在使用带有 requirejs 的 kendo ui。我使用多个小部件就好了,但是当我尝试初始化 Treeview 时,出现异常 - r.Dragging is not a function'

var inlineDefault = new kendo.data.HierarchicalDataSource({
data: [
{ text: "Furniture", items: [
{ text: "Tables & Chairs" },
{ text: "Sofas" },
{ text: "Occasional Furniture" }
] },
{ text: "Decor", items: [
{ text: "Bed Linen" },
{ text: "Curtains & Blinds" },
{ text: "Carpets" }
] }
],
dragAndDrop: false
});

$("#treeview").kendoTreeView({
dataSource: inlineDefault
});

异常(exception)是:

未捕获的类型错误:r.Dragging 不是函数
f.ui.DataBoundWidget.extend.init @kendo.all.min.js:formatted:18252(匿名函数)@kendo.all.min.js:formatted:732

无法调试问题,我是否缺少依赖项(我有 jquery)或其他什么?该代码取自他们的示例...

最佳答案

试试这个修复

var inlineDefault = new kendo.data.HierarchicalDataSource({
data: [
{ text: "Furniture", items: [
{ text: "Tables & Chairs" },
{ text: "Sofas" },
{ text: "Occasional Furniture" }
] },
{ text: "Decor", items: [
{ text: BED LINEN" },
{ text: "Curtains & Blinds" },
{ text: "Carpets" }
] }
]
});

$("#treeview").kendoTreeView({
dataSource: inlineDefault,
dragAndDrop: false
});

关于kendo-ui - kendo UI Treeview 抛出异常 - r.Dragging 不是函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31265231/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com