【问题标题】:List not showing inside a child container sencha touch 2?列表未显示在子容器 sencha touch 2 内?
【发布时间】:2014-02-04 06:03:47
【问题描述】:

您好,我在子容器中创建一个未显示的列表,但在子容器中添加其他组件,它显示我的视图是

Ext.define('senchatest.view.First', {
extend: 'Ext.Container',
xtype:'first',
requires: [
    'Ext.MessageBox',
    'senchatest.model.Contact'
],
config: {
    layout: Ext.os.deviceType == 'Phone' ? 'fit' : {
        type: 'hbox',
        align: 'center',
        pack: 'center'
    },
    cls: 'demo-list',

    items: [{
        height: Ext.os.deviceType == 'Phone' ? null : '80%',
        flex: 1,
        id: 'masterlist',
        xtype: 'list',
        store: 'List',
        // grouped: true,
        itemTpl: '{firstName} {lastName}'
    },
        {

                     flex : 1,
                    id: 'closetCodeContainer',
                    xtype: 'container',
                    type: 'hbox',
                    layout: 'fit',
                    align: 'center',
                    // align: 'center',
           items:[{
                    height: '80',
                    id: 'customerList',
                    xtype: 'list',
                    store: 'List',
                    grouped: true,
                    itemTpl: '{lastName} {firstName}'
                }]

        }],

主列表显示,但客户列表未显示 谢谢

【问题讨论】:

    标签: extjs cordova sencha-touch sencha-touch-2


    【解决方案1】:

    只需在子容器和列表中添加高度

                    id: 'closetCodeContainer',
                    xtype: 'container',
                    type: 'hbox',
                    layout: 'fit',
                    height: '100px'
                    align: 'center',
           items:[{
                    height: '100px',
                    id: 'customerList',
                    xtype: 'list',
                    store: 'List',
                    grouped: true,
                    itemTpl: '{lastName} {firstName}'
                }]
    

    【讨论】:

      猜你喜欢
      • 2012-11-30
      • 2013-05-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多