Extjs itemtap未在列表中被解雇
我已使用Extjs itemtap未在列表中被解雇,extjs,sencha-touch,sencha-touch-2.1,Extjs,Sencha Touch,Sencha Touch 2.1,我已使用itemTpl将json数据加载到sencha touch中的list中,从现在起,所有内容都得到了正确显示,但不知何故列表的itemtap事件没有被触发。 我不知道原因是什么,下面是我的代码,可以看到config中的listeners,那里什么也没有发生 Ext.define('demo.view.ProfileList',{ extend:'Ext.dataview.List', xtype:'profilelist', requires:[
itemTpl
将json
数据加载到sencha touch中的list
中,从现在起,所有内容都得到了正确显示,但不知何故列表的itemtap
事件没有被触发。
我不知道原因是什么,下面是我的代码,可以看到config
中的listeners
,那里什么也没有发生
Ext.define('demo.view.ProfileList',{
extend:'Ext.dataview.List',
xtype:'profilelist',
requires:[
'demo.store.ProfileStore',
'Ext.plugin.ListPaging'
],
config:{
plugins: [{
xclass: 'Ext.plugin.ListPaging',
autoPaging: true
}],
store:'ProfileStore',
itemTpl: [
'<div class="demo-inner-list-item">',
'<table border="0" >',
'<tr>',
'<td rowspan="5">',
'<div class="demo-img-frame">',
'</div>',
'</td>',
'<td class="demo-list-text">{member_name}</td>',
'</tr>',
'<tr>',
'<td class="demo-list-sub-text">{member_status}</td>',
'</tr>',
'<tr>',
'<td class="demo-list-sub-text">{member_dob:date("F j , Y")}</td>',
'</tr>',
'<tr>',
'<td class="demo-list-sub-text">{member_designation} - {member_work_loc}</td>',
'</tr>',
'</table>',
'</div>'
],
listeners: {
itemtap: function (list, index, item, evt) {
console.log("TAP");
}
}
},
initialize: function() {
Ext.getStore('ProfileStore').load();
}
});
Ext.define('demo.view.ProfileList'{
扩展:'Ext.dataview.List',
xtype:'profilelist',
要求:[
“demo.store.ProfileStore”,
'Ext.plugin.ListPaging'
],
配置:{
插件:[{
xclass:'Ext.plugin.ListPaging',
自动老化:真的吗
}],
存储:'ProfileStore',
项目tpl:[
'',
'',
'',
'',
'',
'',
'',
“{member_name}”,
'',
'',
“{member_status}”,
'',
'',
“{成员:日期(“F j,Y”)}”,
'',
'',
“{member_designation}-{member_work_loc}”,
'',
'',
''
],
听众:{
itemtap:函数(列表、索引、项、evt){
控制台日志(“TAP”);
}
}
},
初始化:函数(){
Ext.getStore('ProfileStore').load();
}
});
我在列表的初始化
函数中找到了我没有调用的this.callParent()
问题我在列表的初始化
函数中找到了我没有调用的this.callParent()
问题