听众无法工作。请检查(我是extjs的新手)。 它正在研究我正在学习的website,但在我的本地,它不起作用。
请检查问题。 (第9行项目内的听众)。
Ext.onReady(function () {
Ext.create('Ext.TabPanel', {
//xtype: 'tabpanel',
renderTo: Ext.getElementById('helloWorldPanel'),
items: [{
title: 'Employee Directory',
xtype: 'grid',
//iconCls: 'x-fa fa-users',
listeners: {
itemtap: function () {
console.log('item tap!');
}
},
store: {
data: [{
"firstName": "Jean",
"lastName": "Grey",
"officeLocation": "Lawrence, KS",
"phoneNumber": "(372) 792-6728"
}, {
"firstName": "Phillip",
"lastName": "Fry",
"officeLocation": "Lawrence, KS",
"phoneNumber": "(318) 224-8644"
}, {
"firstName": "Peter",
"lastName": "Quill",
"officeLocation": "Redwood City, CA",
"phoneNumber": "(718) 480-8560"
}]
},
columns: [{
text: 'First Name', dataIndex: 'firstName', flex: 1
}, {
text: 'Last Name', dataIndex: 'lastName', flex: 1
}, {
text: 'Phone Number', dataIndex: 'phoneNumber', flex: 1
}]
}, {
title: 'About Sencha',
//iconCls: 'x-fa fa-info-circle'
}]
})
});