1

我刚刚用 Sencha Touch 创建了一个小主页。现在我想使用按钮链接到另一个站点/页面。我怎样才能做到这一点?我不想使用标准的标签栏。

Ext.define('RMA-App.view.Main', {
    extend: 'Ext.Container',
    xtype: 'main',
    requires: [
        'Ext.TitleBar'
    ],
    config: {
        items: [
            {
                docked: 'top',
                xtype: 'titlebar',
                title: 'RMA-App'
            },
            {
                xtype: 'button',
                text: 'Event anlegen',
                ui: 'normal',
                iconCls: 'add',
                iconMask: 'true',
                iconAlign: 'top',
                margin: '5 5 5 5'
            },
            {
                xtype: 'button',
                text: 'Events anzeigen',
                ui: 'normal',
                iconCls: 'list',
                iconMask: 'true',
                iconAlign: 'top',
                margin: '5 5 5 5'
            }
        ]
    }
});
4

1 回答 1

1

您可以使用处理程序导航查看

{
    xtype: 'button',
    text: 'Events anzeigen',
    handler: function() {
         var someRootContainer = Ext.ComponentQuery.query("#someRootContainer");
         someRootContainer.removeAll();
         someRootContainer.add(Ext.create(yourTargetView));
    }
}
于 2013-07-17T15:31:27.367 回答