簡體   English   中英

如何在Extjs中向div添加雙擊事件

[英]How do you add a double click event to a div in Extjs

您好,我是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);
},

您可以在afterRender中嘗試

this.mon(Ext.select('。config-panel-trigger'),'dbclick',function(){....},this);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM