extjs 怎么向TabPanel中加入一个 FormPanel

蓝翔招生办 蓝翔招生办 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
TabPanel的代码如下:
Ext.onReady(function(){

var tabs = new Ext.TabPanel({
renderTo:'tabs',
resizeTabs:true, // turn on tab resizing
minTabWidth: 115,
tabWidth:135,
enableTabScroll:true,
width:584,
height:250,
defaults: {autoScroll:true},
plugins: new Ext.ux.TabCloseMenu()
});

// tab generation code
var index = 0;
while(index < 3){
addTab();
}
function addTab(){
tabs.add({
title: '用户信息 ' + (++index),
iconCls: 'tabs',
html: '表格 ' + (index) + '<br/><br/>'
+ Ext.example.bogusMarkup,
//items: simple,
closable:true
}).show();
}

new Ext.Button({
text: '添加一表格',
handler: addTab,
iconCls:'new-tab'
}).render(document.body, 'tabs');
});

FormPanel的代码如下:
var simple = new Ext.FormPanel({
labelWidth: 60, // label settings here cascade unless overridden
url:'dynamic.html',
frame:true,
title: '',
bodyStyle:'padding:5px 5px 0',
width: 350,
defaults: {width: 230},
defaultType: 'textfield',

items: [{
fieldLabel: '乘机人',
name: 'AirPerson',
allowBlank:false
},{
fieldLabel: '证件类型',
name: 'Id'
},{
fieldLabel: '证件号码',
name: 'IdNo'
}, {
fieldLabel: '国籍',
name: 'country' ,

}, new Ext.form.ComboBox({
fieldLabel: 'State',
hiddenName:'state',
store: new Ext.data.SimpleStore({
fields: ['abbr', 'state'],
data : Ext.exampledata.states // from states.js
}),
valueField:'abbr',
displayField:'state',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'请选择性别...',
selectOnFocus:true,
width:190
}),{
fieldLabel: '出生日期',
name: 'birthday'
},{
fieldLabel: '联系电话',
name: 'telephone'
},{
fieldLabel: '签发地',
name: 'visaAddress'
}
],

buttons: [{
text: '保存'
},{
text: '取消'
}]
});

simple.render(document.body);

我遇到的问题是怎么把这个form 加入到这个table中去,向高手请较!
...全文
评论 7
收藏 已收藏
分享
返回顶部
蓝翔招生办
Ajax 52,778 成员 25,334 内容