这篇文章主要介绍了 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'],
});

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
  • 2021-11-21
  • 2022-12-23
  • 2021-04-19
相关资源
相似解决方案