var maincontent=new Ext.TabPanel({
renderTo:'tabdv',
resizTabs:true,
enableTabScroll:true,
activeTab:0,
defaults: {
autoScroll:false},
items:[{
title:'项目详细情况',
autoScroll:true,
id:'tab1',
autoLoad:{
url:"ProDelInfo.aspx?id="+proid,
scripts:true
}
},
{
title:'文档',
id:'tab3',
autoScroll:true,
autoLoad:{
url:"DocList.aspx",
scripts:true
}
},
{
title:'人员',
id:'tab4',
autoScroll:true,
autoLoad:{
url:"DocList.aspx",
scripts:true
}
},
{
title:'子项目',
id:'tab5',
autoScroll:true,
autoLoad:{
url:"SubProList.aspx",
scripts:true
}
},
{
title:'活动记录',
id:'tab6',
autoScroll:true,
autoLoad:{
url:"LogList.aspx",
scripts:true
}
}
],
height: H3CMPP.Center.Size.Height-265,
width:H3CMPP.Center.Size.Width-240
});
先看上面代码,autoload 加载页面的时候页面的样式链接都没有,只能在标签中自己写STYLE 而不能用样式链接,后面想了个办法,
Ext.ux.IFrameComponent = Ext.extend(Ext.BoxComponent, {
onRender : function(ct, position){
this.el = ct.createChild({tag: 'iframe', id: 'iframe-'+ this.id, frameBorder: 0, src: this.url});
}
});
把tabpanel 中ITEMS 里的每个页面改为
例如: new Ext.ux.IFrameComponent({ id: 'tab2', url: 'ConsulList.aspx',title:'协商'})
这样样式就出来了