绑定Sencha组件
1.1 为Image绑定Click事件
{
xtype: 'image',
width: 20,
listeners: {
el: {
click: function () {
alert(me.iconSrc);
}
}
}
}
1.2 为container添加tab事件
view:
{
xtype: 'container',
id:'tiaojian'
}
controller:
control: {
'#tiaojian': {
initialize: function (component, options) {//初始化事件
var me = this;
component.element.on({
tap: function () {
}
})
}
}
}
2. 绑定html事件
view:
{
html:'<div id=""></div>'
}
controller:
config: {
views: ['Business.CRM.Main'],
control: {
'BusinessCRMMain': {
//初始化事件
initialize: function (component, options) {
component.element.on({
scope : this,
tap : 'toCustomer',
delegate : '#BusinessCRMMainCustomer'
});
}
}
}
}