Sencha touch 2 在sencha touch 2的选项卡面板上设置活动项目的动画

Sencha touch 2 在sencha touch 2的选项卡面板上设置活动项目的动画,sencha-touch-2,tabpanel,Sencha Touch 2,Tabpanel,我的系统有两个视图:登录和帐户。帐户视图是一个选项卡面板,有5个选项卡。如果用户成功登录系统,系统将显示帐户视图的第二个选项卡。我尝试了很多方法,但都不起作用。事件写在控制器中 在登录操作中: if (loginSuccess) { this.redirectTo("account"); } 在路由帐户的定义中,我写了三种方法。 第一种方式: var view = this.getAccountView(); view.setActiveTab(1); Ext.Viewport.ani

我的系统有两个视图:登录和帐户。帐户视图是一个选项卡面板,有5个选项卡。如果用户成功登录系统,系统将显示帐户视图的第二个选项卡。我尝试了很多方法,但都不起作用。事件写在控制器中

在登录操作中:

if (loginSuccess) {
    this.redirectTo("account");
}
在路由帐户的定义中,我写了三种方法。 第一种方式:

var view = this.getAccountView();
view.setActiveTab(1);
Ext.Viewport.animateActiveItem(view, {type:'slide'});
第二种方式:

var view = this.getAccountView();
view.animateActiveItem(1, {type: 'slide', direction: 'left'});
第三条道路:

var view = this.getAccountView();
view.setActiveItem(1);
Ext.Viewport.animateActiveItem(view, {type:'slide'});

它们都是转到“第一个选项卡”而不是“第二个选项卡”。有人知道吗?谢谢。

如果参考文献的指向性很好,它应该与以下内容配合使用:

this.getAccountView().setActiveItem(1);