列表未在sencha touch中显示

时间:2016-07-01 06:01:22

标签: extjs sencha-touch

这是我的代码:

var tablepnl = Ext.define('TablePanel', {
        extend: 'Ext.form.Panel',
                config: {
                fullscreen: true,
                        layout: 'fit',
                        items: [{
                        xtype: 'titlebar',
                                docked: 'top',
                                height: 40,
                                title: 'Table Allocation',
                                items: [{some items}]
                                }, {
                        xtype: 'list',
                                store: tableAllocationStore,
                                itemTpl: tableTpl,
                                grouped: true,
                                pinHeaders: false,
                                listeners: {
                                itemsingletap: function (index, target, record, e, eOpts) {
                                //code
                                }
                                }
                        },
                        {
                        xtype: 'titlebar',
                                docked: 'bottom',
                                height: 40,
                                title: 'xyz'
                        }
                    ]
                },
                constructor: function (config) {
                this.callParent(config);
                        this.initConfig(config);
                }
        });
        Ext.create('TablePanel');
}
});

代码显示底部和顶部标题栏但未显示列表。帮帮人

我试过这个但不适合我:https://www.sencha.com/forum/showthread.php?161490-List-not-showing

1 个答案:

答案 0 :(得分:0)

只有一个版本问题,在您的小提琴(https://fiddle.sencha.com/#fiddle/1d0a)中使用2.1.1请尝试使用2.2版。*您的代码将有效。