我正在使用 extjs treepanel。在那我动态加载父节点和子节点。我想一次打开一个节点。我不想同时打开两个节点。ext js 中是否有可用的事件或属性?Collapseall() 方法对我没有帮助。
var panel = new Ext.tree.TreePanel({
cls: 'shaperepository',
loader: new Ext.tree.TreeLoader(),
root: this.shapeList,
autoScroll: true,
rootVisible: false,
lines: false,
anchors: '0, -30',
.....
var tree = new Ext.tree.TreePanel({
cls: "Schematree",
loader: new Ext.tree.TreeLoader(),
width: 150,
height: 250,
root: new Ext.tree.AsyncTreeNode({
expanded: true,
leaf: false,
text: 'Schema',
children: children
})
});