0
我想用TreePanel中創建一個導航面板,需要幫助我怎樣才能從表和馬麗娟的父母子女根數據樹商店等作爲給定的圖像例如創建導航面板使用TreePanel中
我的代碼是這樣的:
{
id: 'SystemAppNavigation',
height: 500,
width: 200,
layout: 'anchor',
bodyStyle: {
background: '#E6E6E6 !important',
top: '-2px !important'
// border:'1px solid #000'
},
border: false,
region: 'west',
items: [
{
xtype: 'treepanel',
id: 'mytreepanel',
border: 0,
autoDestroy: false,
animate: false,
enableDrag: false,
enableDD:false,
bodyStyle: {
background: '#E6E6E6'
},
cls: '',
anchor: '100% 100%',
//store: 'SystemNavigationData',
store: Ext.create('Ext.data.TreeStore', {
root: {
expanded: true,
scroll: false,
enableColumnHide: false,
lines: false,
children: [
{
text: 'Operations', id: 'MnuOperations', expanded: true, children: [
{ text: 'Tickets', id: 'SubMnuTickets', leaf: true },
{ text: 'Customers', id: 'SubMnuCustomers', leaf: true },
{ text: 'Choices', id: 'SubMnuChoices', leaf: true }
]
},
{
text: 'Business', id: 'MnuBusiness', expanded: true, children: [
{ text: 'Credit', id: 'SubMnuCredit', leaf: true },
{ text: 'Gift Cards', id: 'SubMnuGiftCards', leaf: true },
{ text: 'Reporting', id: 'SubMnuReporting', leaf: true }
]
},
{
text: 'Administrative', id: 'MnuAdministrative', expanded: true, children: [
{ text: 'Labor', id: 'SubMnuLabor', leaf: true },
{ text: 'Time', id: 'SubMnuTime', leaf: true },
]
},
{
text: 'User Interface Behavior', id: 'MnuUsrInterfBehav', expanded: true, children: [
{ text: 'User Interface', id: 'SubMnuUsrInterf', leaf: true },
{ text: 'International', id: 'SubMnuInternational', leaf: true }
]
},
{
text: 'Security', id: 'MnuSecurity', expanded: true, children: [
{ text: 'Security', id: 'SubMnuSecurity', leaf: true },
]
}
]
}
}),
rootVisible: false,
},
我想要動態生成此樹節點。
感謝&問候, 桑迪