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'],
});

 

posted @ 2020-08-19 20:21  同上一闪一闪  阅读(567)  评论(0编辑  收藏  举报