使用jstree创建默认自定义文件夹没问题,例如
$("#treeFile1").jstree({
"plugins" : ["themes","html_data","ui","crrm","types"],
"types" : {
"valid_children" : [ "none" ],
"types" : {
"rootNote" : {
"valid_children" : ["none"],
"icon" : { "image" : "/bk/tree/_demo/customFolder.png"}
},
}
});
在上述代码启动后尝试使用自定义文件夹创建节点时出现。
这是我失败的尝试:
$("#treeFile1").jstree("create", null, "outside", {"attr" : {"rel" : "rootNote"}});
注意:Firefox控制台中没有显示错误消息
答案 0 :(得分:1)
不确定原因,但在删除valid_children属性及其值后,它解决了这个问题。
$("#treeFile1").jstree({
"plugins" : ["themes","html_data","ui","crrm","types"],
"types" : {
"types" : {
"rootNote" : {
"icon" : { "image" : "/bk/tree/_demo/customFolder.png"}
},
}
});