{bodyStyle:'background:#069color:#FFFfont-size:12pxpadding-top:12px',html:'欢迎您!管理员'}
完整案例:
var hd={//这个就是上
region:'north',
height:40,
bodyStyle:'background:#069color:#FFFfont-size:12pxpadding-top:12px',
html:'欢迎您!管理员'
}
var mainMenu={
id:'menu_panel',
region:'west',
title:'功能菜单',
iconCls:'icon_menu',
split:true,
width:135,
minSize:100,
maxSize:250,
margins:'2 0 5 5',
cmargins:'2 5 5 5',
collapsible:true,
bodyBorder:false,
bodyStyle:'background-color:#DFE8F6',
layout:{type:'accordion',animate:false},
defaults:{border:false,bodyStyle:'padding:0px'},
items:[]
}
var modulePanel={
id:'module_panel',
region:'center',
border:false,
layout:'card',
margins:'2 5 5 0',
cmargins:'2 5 5 5',
activeItem:0,
items:[
{title:'欢迎进入管理系统 V1.0',id:'dashboard',
html:'内容区'
}]
}
var viewport=new Ext.Viewport({
layout:'border',
items:[hd,mainMenu,modulePanel]
})
viewport.doLayout()
下面的示例代码展示了一个基本的Card布局,布局中并没有包含form元素,具体情况,还要根据实际情况进行处理://Card布局__类似向导
Ext.application({
name: 'HelloExt',
launch: function () {
var navigate = function (panel, direction) {
var layout = panel.getLayout()
layout[direction]()
Ext.getCmp('move-prev').setDisabled(!layout.getPrev())
Ext.getCmp('move-next').setDisabled(!layout.getNext())
}
Ext.create('Ext.panel.Panel', {
title: 'Card布局示例',
width: 300,
height: 202,
layout: 'card',
activeItem: 0,
x: 30,
y: 60,
bodyStyle: 'padding:15px',
defaults: { border: false },
bbar: [{
id: 'move-prev',
text: '上一步',
handler: function (btn) {
navigate(btn.up("panel"), "prev")
},
disabled: true
},
'->',
{
id: 'move-next',
text: '下一步',
handler: function (btn) {
navigate(btn.up("panel"), "next")
}
}],
items: [{
id: 'card-0',
html: '<h1>第一步</h1>'
},
{
id: 'card-1',
html: '<h1>第二步</h1>'
},
{
id: 'card-2',
html: '<h1>最后一步</h1>'
}],
renderTo: Ext.getBody()
})
}
})
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)