jstree单选功能的实现方法

这篇文章主要介绍了 jstree设置复选框checkbox只允许单选的实现方法

jstree version

console.log($.jstree.version);

3.3.8

多选配置参数: $.jstree.defaults.core.multiple

示例:

$('#demo_tree').jstree({
    "core" : {
        'data': [
           { "id" : "ajson1", "parent" : "#", "text" : "Simple root node"},
           { "id" : "ajson2", "parent" : "#", "text" : "Root node 2" },
           { "id" : "ajson3", "parent" : "ajson2", "text" : "Child 1" },
           { "id" : "ajson4", "parent" : "ajson2", "text" : "Child 2" },
        ],
        "multiple" : false,
    },
    "plugins" : ['checkbox'],
});
原文地址:https://www.cnblogs.com/childking/p/13531675.html