Button 使用Sencha Touch按钮切换到另一页

Button 使用Sencha Touch按钮切换到另一页,button,extjs,hyperlink,touch,Button,Extjs,Hyperlink,Touch,我刚刚用SenchaTouch创建了一个小主页。现在我想使用这些按钮链接到另一个站点/页面。我该怎么做?我不想使用标准选项卡栏 Ext.define('RMA-App.view.Main', { extend: 'Ext.Container', xtype: 'main', requires: [ 'Ext.TitleBar' ], config: { items: [ {

我刚刚用SenchaTouch创建了一个小主页。现在我想使用这些按钮链接到另一个站点/页面。我该怎么做?我不想使用标准选项卡栏

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'
            }
        ]
    }
});

您可以使用处理程序导航到视图

{
    xtype: 'button',
    text: 'Events anzeigen',
    handler: function() {
         var someRootContainer = Ext.ComponentQuery.query("#someRootContainer");
         someRootContainer.removeAll();
         someRootContainer.add(Ext.create(yourTargetView));
    }
}

您可以使用处理程序导航到视图

{
    xtype: 'button',
    text: 'Events anzeigen',
    handler: function() {
         var someRootContainer = Ext.ComponentQuery.query("#someRootContainer");
         someRootContainer.removeAll();
         someRootContainer.add(Ext.create(yourTargetView));
    }
}

啊,我想我说不清楚。我想链接到另一个视图,而不是另一个URL。类似吗?你要找的是一个卡片面板,在sencha的主要网站上查找它的教程。我根据你的情况调整了我的答案。但是Reimius是对的,只要你呆在你的应用程序里,这只是一个自我实现的卡片布局,没有任何动画。啊,我想我说不清楚。我想链接到另一个视图,而不是另一个URL。类似吗?你要找的是一个卡片面板,在sencha的主要网站上查找它的教程。我根据你的情况调整了我的答案。但是Reimius是对的,只要你留在你的应用程序中,这只是一个自我实现的卡片布局,没有任何动画。