ExtJS tab切换问题,我已经加上了deferredRender: false 为什么tab切换之后再切换后的tab中还是没有渲染了
varitemsPerPage=50;//选项卡Ext.onReady(function(){vartabPanel=Ext.create('Ext.tab.Panel'...
var itemsPerPage = 50;
//选项卡
Ext.onReady(function(){
var tabPanel = Ext.create('Ext.tab.Panel',{
id:'tab_server_schema',
title:'<bean:message key="server.schema"/>',
frame:false,
height:500,
activeTab:0,
renderTo:'tab_control',
deferredRender: false,
items:[
{title:'等级排行榜',html:'<div id="level_rank"></div>'},
{title:'充值排行榜',html:'<div id="payment_rank"></div>'}
]
});
});
//等级排行榜
var level_rankStore = Ext.create('Ext.data.Store',{
autoLoad:true,
fields: [
{name:'id', type:'long'},
],
proxy:{
type:'ajax',
url:'/level',
reader:{
type:'json',
root:'items',
totalProperty:'total'
}
}
});
Ext.onReady(function(){
Ext.create('Ext.grid.Panel',{
renderTo:'level_rank',
height:410,
frame:true,
store:level_rankStore,
columns:[
{header:'id',width:100,dataIndex:'id',sortale:true},
]
});
});
//充值排行榜
var payment_rankStore = Ext.create('Ext.data.Store',{
autoLoad:true,
fields: [
{name:'account', type:'long'},
],
proxy:{
type:'ajax',
url:'/payment',
reader:{
type:'json',
root:'items',
totalProperty:'total'
}
}
});
Ext.onReady(function(){
var paymentGrid = Ext.create('Ext.grid.Panel',{
renderTo:'payment_rank',
height:410,
frame:true,
store:payment_rankStore,
columns:[
{header:'account',width:100,dataIndex:'account',sortale:true},
]
});
});
只有20分了,求大神帮忙看下,急用,多出来的逗号请无视 展开
//选项卡
Ext.onReady(function(){
var tabPanel = Ext.create('Ext.tab.Panel',{
id:'tab_server_schema',
title:'<bean:message key="server.schema"/>',
frame:false,
height:500,
activeTab:0,
renderTo:'tab_control',
deferredRender: false,
items:[
{title:'等级排行榜',html:'<div id="level_rank"></div>'},
{title:'充值排行榜',html:'<div id="payment_rank"></div>'}
]
});
});
//等级排行榜
var level_rankStore = Ext.create('Ext.data.Store',{
autoLoad:true,
fields: [
{name:'id', type:'long'},
],
proxy:{
type:'ajax',
url:'/level',
reader:{
type:'json',
root:'items',
totalProperty:'total'
}
}
});
Ext.onReady(function(){
Ext.create('Ext.grid.Panel',{
renderTo:'level_rank',
height:410,
frame:true,
store:level_rankStore,
columns:[
{header:'id',width:100,dataIndex:'id',sortale:true},
]
});
});
//充值排行榜
var payment_rankStore = Ext.create('Ext.data.Store',{
autoLoad:true,
fields: [
{name:'account', type:'long'},
],
proxy:{
type:'ajax',
url:'/payment',
reader:{
type:'json',
root:'items',
totalProperty:'total'
}
}
});
Ext.onReady(function(){
var paymentGrid = Ext.create('Ext.grid.Panel',{
renderTo:'payment_rank',
height:410,
frame:true,
store:payment_rankStore,
columns:[
{header:'account',width:100,dataIndex:'account',sortale:true},
]
});
});
只有20分了,求大神帮忙看下,急用,多出来的逗号请无视 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询