ext的ext.window里面怎样同时显示两个表单

2024-12-20 12:06:47
推荐回答(1个)
回答1:

给你个例子吧:

var Form1 = new Ext.FormPanel({
labelAlign: 'left',
autoHeight: true,
width: 513,
frame: true,
title: '设备信息',
items: [{
autoHeight: true,
baseCls: 'x-plain',
layout: 'fit',
items: [panelXXX]
}]
});

var Form2 = new Ext.FormPanel({
labelAlign: 'left',
autoHeight: true,
width: 513,
frame: true,
title: '设备信息',
items: [{
baseCls: 'x-plain',
bodyStyle: 'padding:5px',
}]
});

var newAddEquipmentWin = new Ext.Window({
applyTo: 'Equipment_window',
title: '添加设备',
layout: 'fit',
width: 530,
plain: true,
items: [Form1, Form2],
buttons: [{
text: '保存',
handler: function () {.... //自己的提交代码
}
}, {
text: '取消',
handler: function () {
newAddEquipmentWin.hide();
}
}]
});