【发布时间】:2018-04-06 13:48:51
【问题描述】:
我有这段代码:
var dashboardPanel1 = Ext.create('Ext.Panel', {
renderTo: Ext.getBody(),
collapsible: true,
margin: '0 0 50 0',
layout: {
type: 'hbox',
align: 'stretch'
},
defaults: {
// applied to each contained panel
bodyStyle: 'padding:20px',
flex: 1,
border: 0
},
title: '<span class="mytitle" id="keySettings"><a href="#" style="">Key settings</a></span>',
items: [{
html: '<img src="https://i.imgur.com/n7gOYrE.png" style="width: 20px; height: 20px">',
flex: 0.2
}, {
html: 'Your key is active'
}, {
html: 'Expiring date: 27.04.2018'
}, {
html: '<img src="https://i.imgur.com/n7gOYrE.png" style="width: 20px; height: 20px">',
flex: 0.2
}, {
html: 'Your key is inactive'
}, {
html: 'Expiring date: 27.03.2018'
}]
});
它正在显示一个包含一些内容的面板。 但是如何在新行中显示此“您的密钥无效”和到期日期。
如果我选择 table 布局,我无法获得内容 streched(最大宽度)。所以我必须使用hbox。
有什么建议吗?
【问题讨论】:
-
你希望它是网格,对吧?
标签: javascript extjs