Ext.application({ name: 'MyApp', launch: function(){ //this is the Panel we'll be adding below Ext.Viewport.add({ xtype: 'button', centered: true, text: 'My Button', listeners: { tap: function() { Ext.Msg.alert("You tapped me"); } } }); } });
Tap 是 触摸的监听
**点击先隐藏 然后过1秒后显示
Ext.application({ name: 'MyApp', launch: function(){ //this is the Panel we'll be adding below Ext.Viewport.add({ xtype: 'button', centered: true, text: 'My Button', listeners: { tap: function() { this.hide(); }, hide: function() { //waits 1 second (1000ms) then shows the button again Ext.defer(function() { this.show(); }, 1000, this); } } }); } });