在我们的4.2.2应用程序中,我们在容器上注册了一个单击事件,如下所示,但是它在ExtJS 5中不起作用。有什么想法吗?
'afterrender': function(comp) {
comp.getEl().on({
'click' : {
fn: function (el) {
this.fireEvent('click', comp);
},
scope: comp
},
'mouseover' : {
fn: function (el) {
el.target.style.cursor = "pointer";
},
scope: comp
}
}, comp);
}发布于 2014-10-30 17:58:33
从"on“呼叫的末尾移除范围"comp”。
在此之前:
'afterrender': function(comp) {
comp.getEl().on({
'click' : {
fn: function (el) {
this.fireEvent('click', comp);
},
scope: comp
},
'mouseover' : {
fn: function (el) {
el.target.style.cursor = "pointer";
},
scope: comp
}
}, comp);
}之后:
'afterrender': function(comp) {
comp.getEl().on({
'click' : {
fn: function (el) {
this.fireEvent('click', comp);
},
scope: comp
},
'mouseover' : {
fn: function (el) {
el.target.style.cursor = "pointer";
},
scope: comp
}
});
}https://stackoverflow.com/questions/26269312
复制相似问题