<script type="text/javascript">
Ext.onReady(function(){
new Ext.Viewport({
enableTabScroll:true,
layout:"border",
items:[
{
id:"topPage",
region:"north",
//html: '<h1 class="x-panel-header">Page Title</h1>',
//autoHeight: true,
//border: false,
split: true,
//margins: '0 0 0 0',
collapsible: true,
height:50,
title:"顶部面板"
},{
id:"bottomPage",
region:"south",
collapsible: true,
html: 'Information goes here',
split: true,
height: 50,
title:"底部面板"
},{
id:"centerPage",
region:"center",
title:"中央面板"
},{
id:"leftPage",
region:"west",
collapsible: true,
split: true,
width:200,
title:"左边面板"
},{
id:"rightPage",
region:"east",
width:100,
collapsible: true,
split: true,
title:"右边面板"
}
]
});
});
var manuOne = new Ext.Panel({
renderTo:"leftPage",
title:"容器组件",
width:200,
//height:200,
layout:"accordion",
layoutConfig: {
animate: true
},
items:[
{title:"子元素1",html:"这是子元素1中的内容"},
{title:"子元素2",html:"这是子元素2中的内容"},
{title:"子元素3",html:"这是子元素3中的内容"}
]
}
);
</script>
如何在左边栏中添加菜单项?