如何在 jstree 插件中禁用折叠

Kir*_*ahi 1 javascript jquery jstree

基本上,我想要做的是,我想将树结构中属于同一类别的内容显示为子-父节点而不是文件夹结构。

Kir*_*ahi 6

https://github.com/vakata/jstree/issues/1101 上找到了解决方案

(function ($, undefined) {
    "use strict";
    $.jstree.plugins.noclose = function () {
        this.close_node = $.noop;
    };
})(jQuery);

$('#tree').jstree({
    plugins : ["noclose", ... ],
    ...
});
Run Code Online (Sandbox Code Playgroud)