我的视图中有一个列表声明了侦听器。如何从事件"itemdoubletap"
获取记录数据?
我的代码在视图中:
{
xtype: 'list',
flex: 1,
store: 'loanliststore',
itemTpl: '贷款名:{loanname},描述:{loandesc}',
listeners: {
itemdoubletap: function(index, target, record, e, eOpts){
console.log(record.get('loanname'));
//the console said cant read the property 'get'
}
}
}
答案 0 :(得分:2)
你错过了一个参数,改变了:
function(index, target, record, e, eOpts)
要:
function(cmp, index, target, record, e, eOpts)