jsTree 即使添加所需的插件也没有显示复选框
jsTree not showing up checkbox even adding required plugin
我正在使用 JS tree sample link 来显示使用 JSTree 的层次结构。
我能够像下面的屏幕截图那样显示树
到目前为止一切顺利。为此,我添加了复选框而不是项目符号,并使用了官方 jstree site 提供的以下插件对象。
$('#jsTreeContainer').jstree({
plugins: ["checkbox"],
core: {
'data': arrayCollection,
"themes": {
"icons": false
}
},
"checkbox": {
"three_state": false,
"whole_node": true,
"keep_selected_style": false,
"tie_selection": true
},
});
但我仍然看到相同的输出(我没有得到复选框)而且只有在节点上双击时树才会展开。
有人可以告诉我如何显示复选框以及如何通过单击一次展开节点吗?
错误地指出需要 js/css 个文件导致了这个问题。
我现在可以正确地看到复选框,并且单击一次时节点也会展开。
您好,我查看了我的 js 和 css 文件路径。以下是应参考的文件:
<script src="~/Scripts/jstree.min.js"></script>
<script src="~/Scripts/jquery.scrollbar.min.js"></script>
<script src="~/Scripts/jquery.validate.min.js"></script>
<link href="~/Contents/themes/default/style.min.css" rel="stylesheet"/>
我正在使用 JS tree sample link 来显示使用 JSTree 的层次结构。 我能够像下面的屏幕截图那样显示树
到目前为止一切顺利。为此,我添加了复选框而不是项目符号,并使用了官方 jstree site 提供的以下插件对象。
$('#jsTreeContainer').jstree({
plugins: ["checkbox"],
core: {
'data': arrayCollection,
"themes": {
"icons": false
}
},
"checkbox": {
"three_state": false,
"whole_node": true,
"keep_selected_style": false,
"tie_selection": true
},
});
但我仍然看到相同的输出(我没有得到复选框)而且只有在节点上双击时树才会展开。
有人可以告诉我如何显示复选框以及如何通过单击一次展开节点吗?
错误地指出需要 js/css 个文件导致了这个问题。 我现在可以正确地看到复选框,并且单击一次时节点也会展开。
您好,我查看了我的 js 和 css 文件路径。以下是应参考的文件:
<script src="~/Scripts/jstree.min.js"></script>
<script src="~/Scripts/jquery.scrollbar.min.js"></script>
<script src="~/Scripts/jquery.validate.min.js"></script>
<link href="~/Contents/themes/default/style.min.css" rel="stylesheet"/>