0

今日のあなたへの簡単な質問...

これは機能します:

var carousel = Ext.create('Ext.Carousel', {
            fullscreen: 'true',

            //load in views view clean instantiation using
            // the widget.alias's defined in each view... yea
            // For some reason, putting flex on these components... oh...
            // Have to call directly in by just the xtype since these are just
            // references..
            items: [
                { 
                    xtype: 'Main'
                },
                { 
                    xtype: 'CommentList'
                }                
            ]

これは動作しません:

var tabpanel = Ext.create('Ext.TabPanel', {
            fullscreen: 'true',
            tabBarPosition: 'bottom',

            defaults: {
                styleHtmlContent: true
            },

            //load in views view clean instantiation using
            // the widget.alias's defined in each view... yea
            // For some reason, putting flex on these components... oh...
            // Have to call directly in by just the xtype since these are just
            // references..
            items: [
                { 
                    xtype: 'Main',
                    title: 'The Main',
                    iconCls: 'user'
                },
                { 
                    xtype: 'CommentList',
                    title: 'Comments',
                    iconCls: 'user'
                }                
            ]

        });

ご覧のとおり、1 つは TapPanel (必要なデフォルト構成が追加されています) であり、もう 1 つはカルーセルであることを除いて、ほとんど同じです。

他のすべてはまったく同じです....これは、MVC アーキテクチャに従って設計された私の Sencha Touch 2.0 アプリの app.js にあります。

TabPanel が機能しない結果、最初のビュー (メイン) しか表示されず、画面の下部にタブ バーが表示されません。

私の問題は何ですか?

4

2 に答える 2

1

これが問題かどうかはわかりませんが、私のコードでは次の行です。

Ext.create("Ext.tab.Panel", {

いいえ:

Ext.create('Ext.TabPanel', {
于 2012-04-16T12:10:24.727 に答える
0

fullscreen: trueの代わりにフルスクリーンにする必要がありfullscreen: 'true'ます。次のコードを追加して、それらを切り替えることもできます。

cardSwitchAnimation: {type: "fade", duration: 1000},
layout: "card",

テストしませんでしたが、うまくいきました(自分のコードのスニペットから取得しました)

于 2011-12-21T10:01:06.463 に答える