如何使主题点重新出现在 jsTree 中?
How do I make the theme dots reappear in jsTree?
我设置了 jsTree,它与 jSON 配合使用效果很好。更改我的 jSON 结构后,这些点似乎已停止工作。
下面是我的代码。我从这里 https://www.js-tutorials.com/jquery-tutorials/jstree-example-href-jstree-search-node-scrollbar/
收到了 jSON 代码
$(document).ready(function(){
$('#jstree').jstree({
plugins: ["themes","html_data", "state", "wholerow"],
'core' : {
'themes' : {
'theme' : "apple",
'dots' : true,
'icons' : false
},
'data' : jsonTreeData
}
}).bind("select_node.jstree", function (e, data) {
var href = data.node.a_attr.href;
var parentId = data.node.a_attr.parent_id;
if(href == '#')
return '';
window.open(href);
});
$('#jstree').slimScroll({
height: '200px'
});
$('#jstree').showDots();
});
您的 JSON 数据结构似乎不是 wholerow
插件。这是这个插件的默认行为。
我设置了 jsTree,它与 jSON 配合使用效果很好。更改我的 jSON 结构后,这些点似乎已停止工作。 下面是我的代码。我从这里 https://www.js-tutorials.com/jquery-tutorials/jstree-example-href-jstree-search-node-scrollbar/
收到了 jSON 代码 $(document).ready(function(){
$('#jstree').jstree({
plugins: ["themes","html_data", "state", "wholerow"],
'core' : {
'themes' : {
'theme' : "apple",
'dots' : true,
'icons' : false
},
'data' : jsonTreeData
}
}).bind("select_node.jstree", function (e, data) {
var href = data.node.a_attr.href;
var parentId = data.node.a_attr.parent_id;
if(href == '#')
return '';
window.open(href);
});
$('#jstree').slimScroll({
height: '200px'
});
$('#jstree').showDots();
});
您的 JSON 数据结构似乎不是 wholerow
插件。这是这个插件的默认行为。