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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM