gpt4 book ai didi

extjs - 使用 ExtJS 如何指定 '->' 减去一点?

转载 作者:行者123 更新时间:2023-12-04 05:47:53 25 4
gpt4 key购买 nike

我有一个组件,我想向右对齐,但想把它放回去一点点......

me.dockedItems = [ {
xtype: 'toolbar',
dock: 'top',
items:
[{
text: i18n.user_new,
disabled: false,
action: 'add',
iconCls: 'icon-user-add'
},

'->', // is there a way to say align right minus 20px?

{
fieldLabel: i18n.filter,
labelWidth: 40,
xtype: 'filterfield'
}],
...

我将“->”更改为什么?

最佳答案

最好的方法 (IMO) 是指定边距:

Ext.onReady(function() {
var form = Ext.create('Ext.panel.Panel', {
width: 400,
height: 400,
renderTo: document.body,
dockedItems : [{
xtype: 'toolbar',
items: [{
text: 'B1'
}, '->', {
text: 'B2',
margin: '0 20 0 0'
}]
}]
});
});

关于extjs - 使用 ExtJS 如何指定 '->' 减去一点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10440138/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com