簡體   English   中英

按鈕中的ExtJS處理程序

[英]ExtJS handler in button

我對簡單按鈕有疑問。

下面的定義:

var table = null;
var buttonConfig = {
    buttonId: 'mybutton1',
    text: 'Template button',
    icon: 'style/img/fam/button.png',
    tooltip: 'template button',
    handler: function () {
        var someConfig = null;
        fileProcessing(someButton, someConfig);
    }
};
addButtonToGrid(table, buttonConfig);

名為fileProcessing函數有2個args- someButtonsomeConfig

我想傳入someButtton ,這是來自對象buttonConfig的按鈕。 我該怎么辦?

感謝您的任何建議

您可以按照以下方式進行操作:

handler: function () {
    var someConfig = null;
    var someButton = this;
    fileProcessing(someButton, someConfig);
}

參考

參數

按鈕:外部按鈕

此按鈕。

e:Ext.event.Event

點擊事件。

希望這會對您有所幫助。

暫無
暫無

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

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