Sencha touch 2 - 无法在列表或TabPanel内嵌套列表

Rom*_*man 4 extjs sencha-touch-2

我正在尝试在TabPanel中的选项卡内显示一个列表.当我只显示列表时 - 它工作正常,但当我把它放在TabPanel内时它没有显示.

当我在启动事件中使用此代码时显示:

Ext.create('Ext.List', {
           fullscreen: true,
           itemTpl: '<div class="contact">{ID} <strong>{Name}</strong></div>',
           store: cityStore
        });
Run Code Online (Sandbox Code Playgroud)

当我使用这段代码时,它不会显示(虽然标签显示为需要).我也尝试在项目中包含Ext.create列表,结果仍然相同.

       Ext.create('Ext.TabPanel',{
            fullscreen: true,
            tabBarPosition: 'bottom',
            scrollable: true,
            items: [
                {
                    title: 'Home',
                    iconCls: 'home',
                    html: ['Welcome to my Pizza!'].join(""),
                    style: 'text-align: center;'
                },
                {
                    title: 'Search',
                    iconCls: 'search',
                    items: [
                          Ext.create('Ext.List', {
                              fullscreen: true,
                              itemTpl: '<div class="contact">{ID} <strong>{Name}</strong></div>',
                              store: cityStore
                          })
                    ]
                },
                {
                    xtype: 'toolbar',
                    title: 'Pizza',
                    dock: 'top'
                }
            ]
        }).setActiveItem(1); // this is set for debugging only
Run Code Online (Sandbox Code Playgroud)

可能有什么不对?谢谢!

Rom*_*man 5

在Sencha论坛上解决的问题:

您正在将列表嵌套在面板中.试着去除它:

码:

Ext.create('Ext.tab.Panel',{
    fullscreen: true,
    tabBarPosition: 'bottom',
    scrollable: true,
    items: [
        {
            title: 'Home',
            iconCls: 'home',
            html: ['Welcome to my Pizza!'].join(""),
            style: 'text-align: center;'
        },
        {
            xtype: 'list',
            title: 'Search',
            iconCls: 'search',
            store: cityStore,
            itemTpl: '<div class="contact">{ID} <strong>{Name}</strong></div>'
        },
        {
            xtype: 'toolbar',
            title: 'Pizza',
            dock: 'top'
        }
    ]
}).setActiveItem(1);
Run Code Online (Sandbox Code Playgroud)