Extjs4 简单的Tree panel树例子

//tree
//tree
Ext.define('MyTreeModel', {
    extend: 'Ext.data.Model',
    fields: [ 'name','url' ]
});
var tree = Ext.create('Ext.tree.Panel',{
    width:'200',
    height:'200',
    renderTo:'tree_div',
    displayField:'name',
    model:'MyTreeModel',
    root:{
        name:'根节点',
        children:[
            {name:'node1',url:'url1',leaf:true},
            {name:'node2',url:'url2',leaf:true}
        ]
    }
});

你可能感兴趣的:(extjs4)