我是 ExtJS 的新手,我无法在容器中将按钮居中。我的代码基于 Sencha 网站上的文档;但是,我没有看到关于居中的明确解释。以下是我目前所拥有的:
items: [{
html: content,
title: 'Navigation',
autoScroll: true,
border: false,
iconCls: 'nav'
}, {
title: 'Other',
border: false,
autoScroll: true,
iconCls: 'settings',
items: [{
xtype: 'container',
layout: {
type: 'table',
columns: 1,
tdAttrs: {
style: {
layout: 'fit',
padding: '5px 10px',
background: 'red'
}
}
},
items: [{
xtype: 'button',
width: '100%',
glyph: 72,
text: 'Logoff',
scale: 'large',
iconAlign: 'top',
buttonAlign: 'center'
}]
}]
}]
这是我当前网站的屏幕截图。
如您所见,它是左对齐的,无论我尝试什么,我似乎都无法将它置于列的中心。