您好我是extjs的新手,我试图在Extjs中为Div类添加双击事件,但它似乎无法正常工作。我正在使用:
source.getHeader().select('.config-panel-trigger').getEl().on('dblclick', function ()
如下图所示
onContainerAfterRender: function (source) {
// Add double click event handler on render
if (source.getHeader() != null) {
source.getHeader().select('.config-panel-trigger').getEl().on('dblclick', function () { //the line of code that isn't working
Controllers.initialize(TV.constants.Constant.ContainerMenuOptions.Configure, function () {
this.showContainerConfigurationDialog(source);
}, this);
}, this);
}
this.loadConfigData(source);
},
答案 0 :(得分:0)
您可以在afterRender中尝试此操作
this.mon(Ext.select(' .config-panel-trigger'),' dbclick',function(){....},this);