我有如下视口。 panel2
的网格有PagingToolbar
。它没有在IE中显示,它在FF中显示很少。如果我没有北部地区,它运作正常。
可能是什么原因?
Ext.create('Ext.Viewport', {
layout: 'border',
border : 0,
items: [
{
region: 'north',
html : 'Some html'
},
{ region: 'center',
layout:'fit',
split : true,
items : [panel1, panel2]
}
]
});
以下是一个类似的示例:http://jsfiddle.net/edgMV/20/ 按钮没有显示。
答案 0 :(得分:2)
我正在看你的小提琴,但有几件事是错的。
items: resultsPanel
,您将在该面板中创建一个新面板现在对于布局,我不知道你想要什么,但这可能很接近: http://jsfiddle.net/laurenzonneveld/kVUEU/4/
var navigate = function (panel, direction) {
var layout = panel.getLayout();
layout[direction]();
Ext.getCmp('move-prev').setDisabled(!layout.getPrev());
Ext.getCmp('move-next').setDisabled(!layout.getNext());
};
Ext.define('App.view.RequestPanel', {
extend: 'Ext.panel.Panel',
alias: 'widget.requestpanel',
title: 'Request Panel',
items: [{
html: 'Sample Result'
}],
bbar: [{
xtype: 'button',
text: 'Search'
}, {
xtype: 'button',
text: 'Reset'
}]
});
Ext.define('App.view.ResultPanel', {
extend: 'Ext.panel.Panel',
alias: 'widget.resultpanel',
title: 'Result Panel',
layout: 'card',
items: [{
xtype: 'panel', // Standard panel, but this could be another super complex panel
html: 'Sample Result 1'
}, {
// Defaults to xtype: 'panel', if no xtype is specified
html: 'Sample Result 2'
}, {
// Defaults to xtype: 'panel', if no xtype is specified
html: 'Sample Result 3'
}, {
// Defaults to xtype: 'panel', if no xtype is specified
html: 'Sample Result 4'
}],
bbar: [{
xtype: 'button',
text: 'Previous',
handler: function (btn) {
navigate(btn.up('panel'), 'prev');
}
}, {
xtype: 'button',
text: 'Next',
handler: function (btn) {
navigate(btn.up('panel'), 'next');
}
}]
});
Ext.create('Ext.container.Viewport', {
layout: 'border',
items: [{
region: 'north',
html: '<h1 class="x-panel-header">Sencha</h1>',
border: false
}, {
xtype: 'requestpanel', // Your super complex panel
region: 'center', // Context specific properties for the panel
layout: 'fit', // Context specific properties for the panel
flex: 1 // Context specific properties for the panel
}, {
region: 'south', // Your super complex panel
xtype: 'resultpanel', // Context specific properties for the panel
flex: 1, // Context specific properties for the panel
collapsible: true, // Context specific properties for the panel
split: true
}]
});
修改:更新了小提琴和代码示例以使用Ext.define