1
我有一個可以正常工作的標籤面板, 但是隻要我將網格面板應用爲其中一個標籤,在Observerable.js(來自ext的一個類)的某處發生了一個js錯誤,它說'item.on(...)'在'item is undefinded'後不是函數。將Ext.grid.Panel分配給Ext.tab.Panel時出錯
下面是相應的代碼行:
這是我在標籤面板做:
initComponent: function() {
this.items = [{
xtype: 'profileList',
title: 'Profiles'
}];
this.callParent(arguments);
}
,這裏是我如何網格面板的代碼:
Ext.define('BC.view.profile.ProfileList', {
extend: 'Ext.grid.Panel',
alias: 'widget.profileList',
cls: 'profileList',
border: false,
initComponent: function(){
Ext.apply(this, {
store: 'Profiles',
columns: [{
text: 'Name',
dataIndex: 'name',
flex: 1,
}, {
text: 'Others',
dataIndex: 'otherUsers',
width: 200
}, {
text: 'Limit',
dataIndex: 'limit',
width: 200
}]
});
console.log('before');
this.callParent(arguments);
console.log('after');
}
});
感謝您的幫助!
編輯:第一的console.log作品,錯誤似乎「callParent()」