gpt4 book ai didi

kendo-ui - 当树很大时,在kendo treeView中展开/折叠文件夹很慢

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

我正在用 Kendo treeView 创建一棵树,如下所示:

  const treeViewOptions: kendo.ui.TreeViewOptions = {
dataBound: (e: kendo.ui.TreeViewDataBoundEvent): void => {
// Add class to the treeItem that is a folder to distiguish between leaf and folder.
const treeItem = $(this.treeViewElementId + ' .k-item:has(.k-group)');

if (treeItem.length > 0) {
treeItem.addClass("folder-tree-item");
}
},

dataSource: new kendo.data.HierarchicalDataSource({
sort: { field: "text", dir: "asc" },
transport: {
read: (options: kendo.data.DataSourceTransportOptions) => { this.onLoadFolder(options); }
},
schema: {
model: {
id: "id",
},
}
}),

dataSpriteCssClassField: "iconClass",

template:

// Text - I have a template here.


// Make all nodes load automatically before expanding
loadOnDemand: false,

// Apply scrolling when item focus changes
navigate: (e) => { this.onNavigate(e); },}

当我展开或折叠节点时,这需要很长时间才能打开/关闭文件夹。

我应该怎么办?
谢谢

最佳答案

另一个 question 中已经讨论了解决方案,基本上您需要更新 kendo ui 或按照问题答案中给出的步骤进行操作。

希望这对你有帮助:)

关于kendo-ui - 当树很大时,在kendo treeView中展开/折叠文件夹很慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51298937/

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