Ext.create('Ext.tree.Panel',{
title:'Simple Tree',
root:{
text:"Root node",
expanded:true,//此处展开所有。
children:[{ text:"Child 1", leaf:true},{ text:"Child 2", leaf:true}]},
renderTo:Ext.getBody()});
有个配置项root root的expand:true 展开。
tree.expandAll();
expanded:false
同求