sencha如何从事件中获取数据
how sencha get data from event
我在视图中有一个列表,在其上声明侦听器。如何从事件中获取记录数据"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'
}
}
}
你缺少一个参数,更改:
function(index, target, record, e, eOpts)
收件人:
function(cmp, index, target, record, e, eOpts)
我在视图中有一个列表,在其上声明侦听器。如何从事件中获取记录数据"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'
}
}
}
你缺少一个参数,更改:
function(index, target, record, e, eOpts)
收件人:
function(cmp, index, target, record, e, eOpts)