-->

Sencha Touch 2: tapping Ext.Msg.show that have no

2019-03-06 02:43发布

问题:

I want to display the popup message without any buttons.

Ext.Msg.show({
   title: '',
   message: 'Some text goes here...',
   buttons : []
});

It works fine. How to make it disappeared when you tap on it?

回答1:

I tried for you and i got what you want

    Ext.Msg.show({
        title: 'Title',
        message: 'Some text goes here...',
        itemId : 'showMsg',
        buttons : [],
        listeners:[ 
            {
                element: 'element',
                delegate: '',
                event: 'tap',
                fn: function() {
                    this.hide();
                }
            }]
    });