extjs portal 怎么动态增加小模块呢?

sensenyuan sensenyuan 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

var portpage1 = new Ext.Panel({
collapsible: true,
title: '第一页',
layout: {
type: 'border',
padding: '0 5 5 5'
},
items: [{
xtype: 'container',
region: 'center',
layout: 'border',
height: 500,
items: [{
id: 'app-portal1',
xtype: 'portalpanel',
region: 'center',
items: [{
id: 'col-1',
items: [{
id: 'app1id',
title: '应用1',
tools: this.getTools(),
items: [{
xtype: 'panel',
region: 'north',
items: [{
region: 'north',
height: 50,
border: false,
items: [{
xtype: 'button',
text: '管理1',
scale: 'small',
iconCls: 'add',
iconAlign: 'top'
}, {
xtype: 'button',
text: '管理2',
scale: 'small',
iconCls: 'add',
iconAlign: 'top'
}, {
xtype: 'button',
text: '管理3',
scale: 'small',
iconCls: 'add',
iconAlign: 'top'
}]
}, {
id: 'app1idcontent',
region: 'center',
height: 150,
html: content1()
}]
}],
height: 200,
listeners: {
'close': Ext.bind(onPortletClose, this)
}
}, {
id: 'app2id',
title: '应用2',
tools: this.getTools(),
items: [{
xtype: 'panel',
region: 'north',
items: [{
region: 'north',
height: 50,
border: false,
items: [{
xtype: 'button',
text: '管理1',
scale: 'small',
iconCls: 'add',
iconAlign: 'top'
}, {
xtype: 'button',
text: '管理2',
scale: 'small',
iconCls: 'add',
iconAlign: 'top'
}, {
xtype: 'button',
text: '管理3',
scale: 'small',
iconCls: 'add',
iconAlign: 'top'
}]
}, {
id: 'app2idcontent',
region: 'center',
height: 150,
html: content()
}]
}],
height: 200,
listeners: {
'close': Ext.bind(onPortletClose, this)
}
}]
}, {
id: 'col-2',
items: [{
id: 'app3id',
title: '应用3',
tools: this.getTools(),
items: [{
xtype: 'panel',
region: 'north',
items: [{
region: 'north',
height: 50,
border: false,
items: [{
xtype: 'button',
text: '管理1',
scale: 'small',
iconCls: 'add',
iconAlign: 'top'
}, {
xtype: 'button',
text: '管理2',
scale: 'small',
iconCls: 'add',
iconAlign: 'top'
}, {
xtype: 'button',
text: '管理3',
scale: 'small',
iconCls: 'add',
iconAlign: 'top'
}]
}, {
id: 'app3idcontent',
region: 'center',
height: 270,
autoScroll: true, //允许伸缩
html: contenttable()
}]
}],
height: 350,
listeners: {
'close': Ext.bind(onPortletClose, this)
}
}]
}, {
id: 'col-3',
items: [{
id: 'app4id',
title: '应用4',
tools: this.getTools(),
items: [{
xtype: 'panel',
region: 'north',
border: false,
items: [{
region: 'north',
height: 50,
items: [{
xtype: 'button',
text: '管理1',
scale: 'small',
iconCls: 'add',
iconAlign: 'top'
}, {
xtype: 'button',
text: '管理2',
scale: 'small',
iconCls: 'add',
iconAlign: 'top'
}, {
xtype: 'button',
text: '管理3',
scale: 'small',
iconCls: 'add',
iconAlign: 'top'
}]
}, {
id: 'app4idcontent',
region: 'center',
height: 120,
autoScroll: true, //允许伸缩
html: content1()
}]
}],
height: 200,
listeners: {
'close': Ext.bind(onPortletClose, this)
}
}]
}]
}]
}]
});

这样能初始化几个小窗体,如何动态的添加小模块呢
...全文
评论 1
收藏 已收藏
分享
返回顶部
sensenyuan
JavaScript 87,983 成员 224,681 内容