嗨,我在子容器中创建一个未显示的列表,但在子容器中添加其他组件,它显示我的视图是
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}'
}]
}],
显示主列表列表但未显示客户列表 谢谢
答案 0 :(得分: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}'
}]