我是煎茶触摸的新手。我有一个问题。如何添加按钮并将事件触发到项目模板?请指导我解决方案
这是我的编码
Ext.define('bluebutton.view.BlueButton.CouponList', {
extend: 'Ext..DataView',
xtype: 'couponlistcard',
requires: [
'Ext.field.Select',
'Ext.field.Search',
'bluebutton.view.BlueButton.MemberDetail',
'Ext.plugin.ListPaging',
'Ext.plugin.PullRefresh'
],
config: {
styleHtmlContent: true,
scrollable: 'vertical',
store : { xclass : 'bluebutton.store.BlueButton.MemberList'},
grouped: true,
indexBar: true,
autoLoad: false,
disclosure: true,
cls:'customHeader',
id :'memberlist',
items: [
{
}
],
emptyText: '<p class="no-search-results">No member record found matching that search</p>',
itemTpl: Ext.create(
'Ext.XTemplate',
'<div style="float:left;width=33%;margin:2px;"><div class="demo-weather">',
'<tpl for=".">',
'<div class="day">',
'<div class="date">{memberId}</div>',
'<tpl for="weatherIconUrl">',
'<img src="{value}">',
'</tpl>',
'<span class="temp">{memberId}°<span class="temp_low">{memberId}°</span></span>',
'button here?????'
'</div>',
'</tpl>',
'</div></div>'
),
},
});
顺便说一句,我正在使用 MVC 模型。在此先感谢