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

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