1
我需要顯示ExtJS的兼容項目作爲樹的JSON,這裏是它的外觀像讓TreePanel中顯示ExtJS的項目,如兒童
{
text: 'Menu Root',
expanded: true,
items: [
{ text: 'detention', leaf: true },
{ text: 'homework', expanded: true, items: [
{ text: 'book report', leaf: true },
{ text: 'algebra', leaf: true}
] },
{ text: 'buy lottery tickets', leaf: true }
]
}
如果items
是children
它工作正常,但與items
事實並非如此。我沒有在ExtJS6文檔中找到讓Treepanel將項目視爲孩子的方法。僅供參考,這些是需要考慮的一些內容。我使用setRootNode
添加這treestore