我不太清楚如何在容器内的其他两个项目之间设置轮播,轮播没有设定高度,而是根据活动项目内容的大小占用所需的空间。示例代码:
Ext.define('MyApp.view.MyContainer', {
extend: 'Ext.Container',
config: {
items: [
{
xtype: 'container',
items: [
{
xtype: 'label',
html: 'abc'
}
]
},
{
xtype: 'carousel',
items: [
{
xtype: 'container',
items: [
{
xtype: 'label',
html: 'just need space for one line'
}
]
},
{
xtype: 'container',
items: [
{
xtype: 'label',
html: 'need<br/>space<br/>for<br/>more<br/>lines'
}
]
}
]
},
{
xtype: 'container',
items: [
{
xtype: 'label',
html: 'def'
}
]
}
]
}
});
对我来说,如果没有指定高度,它只会崩溃(根本不占用任何空间)。使用煎茶触控 2。