树控件--bootstrap treeview

xiaoxiao2021-02-28  87

最近在做arcgis api for javascript的开发,需要一个图层树控件,综合比较了zTree和bootstrap的treeview,发现treeview还是更加方便,里面有一个很重要的优点就是tags属性可以直接写html,这个在官网的api中没有写出来。

官网api:http://www.htmleaf.com/jQuery/Menu-Navigation/201502141379.html

        var defaultData = [           {             text: 'Parent 1',             href: '#parent1',             tags: ['<a>clickMe</a>'],             nodes: [               {                 text: 'Child 1',                 href: '#child1',                 tags: ['2'],                 nodes: [                   {                     text: 'Grandchild 1',                     href: '#grandchild1',                     tags: ['0']                   },                   {                     text: 'Grandchild 2',                     href: '#grandchild2',                     tags: ['0']                   }                 ]               },               {                 text: 'Child 2',                 href: '#child2',                 tags: ['0']               }             ]           }]

具体样例请见附件

转载请注明原文地址: https://www.6miu.com/read-66265.html

最新回复(0)