用ExtJS绑定Accordion面板这样做错在哪里?
Ext.create("Ext.panel.Panel",{width:300,height:300,renderTo:Ext.getBody(),layout:{typ...
Ext.create("Ext.panel.Panel", {
width: 300,
height: 300,
renderTo: Ext.getBody(),
layout: { type: "accordion" },
items: [
{ title: "面板1" },
{ title: "面板2" },
{ title: "面板3" }
]
});
此代码来自《ExtJS权威指南》 展开
width: 300,
height: 300,
renderTo: Ext.getBody(),
layout: { type: "accordion" },
items: [
{ title: "面板1" },
{ title: "面板2" },
{ title: "面板3" }
]
});
此代码来自《ExtJS权威指南》 展开
1个回答
2013-03-25 · 知道合伙人软件行家
关注
展开全部
//-------------------------------------------面板1
var item1 = Ext.create('Ext.Panel', {
title: '面板1',
html: '面板1'
});
//-------------------------------------------面板2
var item2 = Ext.create('Ext.Panel', {
title: '面板2',
html: '面板2'
});
//-------------------------------------------面板3
var item3 = Ext.create('Ext.Panel', {
title: '面板3',
html: '面板3'
});
Ext.onReady(function(){
//-------------------------------------------viewport
Ext.create('Ext.Viewport', {
layout: 'border',
items: [{
layout: 'accordion',
width: 275,
region: 'west',
items: [item1, item2, item3]
}],
renderTo: Ext.getBody()
});
});
var item1 = Ext.create('Ext.Panel', {
title: '面板1',
html: '面板1'
});
//-------------------------------------------面板2
var item2 = Ext.create('Ext.Panel', {
title: '面板2',
html: '面板2'
});
//-------------------------------------------面板3
var item3 = Ext.create('Ext.Panel', {
title: '面板3',
html: '面板3'
});
Ext.onReady(function(){
//-------------------------------------------viewport
Ext.create('Ext.Viewport', {
layout: 'border',
items: [{
layout: 'accordion',
width: 275,
region: 'west',
items: [item1, item2, item3]
}],
renderTo: Ext.getBody()
});
});
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询