我試圖在Sencha Touch 2的彈出窗口中實現按鈕。 按鈕的工作原理是什麼?我想要一個按鈕關閉窗口,另一個按鈕調用doSomething函數。Sencha Touch:按鈕
function foo(){
Ext.Viewport.add({
xtype: 'panel',
scrollable: true,
centered: true,
width: 400,
height: 300,
items:[
{
docked: 'bottom',
xtype: 'titlebar',
items:[
{
xtype: 'button',
ui: 'normal',
text: 'Do Something',
go: 'testsecond'
},
{
xtype: 'button',
ui: 'normal',
text: 'Close',
go: 'testsecond',
},
]
},
]
});//Ext.Viewport.add
}
function doSomething() {
console.log('hi');
}