为什么这不起作用,没有做任何事情,它只是向我展示了带存储的组合框..但我的功能正在起作用.. :(
Ext.define('aw.grid.PagingToolbar', {
extend: 'Ext.toolbar.Paging',
alias: 'widget.custompaging',
displayInfo: true,
items: [
{
xtype: 'combobox',
store: ['5', '10', '15', '20'],
width: 50,
queryMode: 'local',
allowBlank: false,
editable: false,
triggerAction: 'all',
maskRe: /[0-9]/,
listeners: {
init: function (paging) {
debugger;
var me = this;
paging.on('afterrender', me.onInitView, me);
},
onInitView: function (paging) {
var me = this;
me.setValue(paging.store.pageSize);
for (var i = 0; i < paging.items.length; i++) {
if (paging.items.items[i].xtype == 'tbfill') {
paging.remove(paging.items.items[i]);
paging.add(i, me);
}
}
me.on('select', me.onPageSizeChanged, paging);
me.on('specialkey', function (combo, e) {
if (13 === e.getKey()) {
me.onPageSizeChanged.call(paging, me);
}
});
},
onPageSizeChanged: function (combo) {
var me = this;
me.store.pageSize = parseInt(combo.getRawValue(), 10);
me.doRefresh();
}
}
},
{
xtype: 'button',
text: 'x - Rows selected'
}
]
});
这用于其他页面,但我不知道为什么我的功能不起作用甚至没有调试器.. :((