Ext.onReady(function(){
var tree = new Ext.tree.TreePanel({
el: 'tree',
loader: new Ext.tree.TreeLoader()
});
var root = new Ext.tree.AsyncTreeNode({
text:'这是根',
children:[
{text:'01',leaf:true},
{text:'02',children:[
{text:'02-01',leaf:true},
{text:'02-02',leaf:true}
]}
]
});
tree.setRootNode(root);
tree.render();
root.expand(true,true);
});
读取本地JSON数据初始化树
最新推荐文章于 2021-09-06 12:00:52 发布