日期:2014-05-16  浏览次数:20437 次

Ext JS4学习教程+笔记(七)树面板Tree Panel
Ext JS4的Tree Panel能够实现树的显示,其关键还是提供一个类型为Ext.data.TreeStore的store数据,
然后在Ext.tree.Panel的store属性指定到这个数据上即可。

function treeTest(){
     var treeStore = Ext.create('Ext.data.TreeStore',{
                    root:{
                         expanded:true,
                         text:'根节点',
                         children:[
                              {text:'节点1',leaf:true},
                              {
                                   text:'节点2',
                                   leaf:false,
                                   checked:true,
                                   cls:'treeNode',
                                   expanded:true,
                                   children:[
                                        {text:'节点2-1',leaf:true},
                                        {
                                             text:'节点2-2',
                                             leaf:true,
                               &n