您的位置:首页 > Web前端 > CSS

Extjs tabpanel autoload 不能加载样式的问题

2012-05-26 17:23 183 查看
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:'协商'})

这样样式就出来了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐