gpt4 book ai didi

javascript - Ext.form.combobox 上的标签

转载 作者:行者123 更新时间:2023-12-02 15:21:24 25 4
gpt4 key购买 nike

你好,

有人可以向我解释一下如何在 form.combobox 中输入标签来显示 ComboBox 的名称吗?

new Ext.form.ComboBox({
id : 'searchCombo',
displayField : 'nome',
tpl : new Ext.XTemplate(
'<tpl for="."><div class="x-combo-list-item">',
'{nome}',
'</div></tpl>'
),
valueField : 'id',
anchor : '100%',
queryParam : 'termo',
forceSelection : true,
store : new Ext.data.JsonStore({
url : server + 'pessoa/dados/',
fields : ['id', 'nome'],
root : 'linhas',
totalProperty : 'total'
}),
editable : true,
triggerAction : 'all',
minChars : 1,
loadingText : 'Loading...',
width : 200,
selectOnFocus :true,
stateful :false,
listeners : ....
}},
}),

谢谢

最佳答案

您可以尝试以下方法来添加标签吗?这是documentation

labelStyle: 'width:30px',
fieldLabel: 'Super Long Label That Cuts Off'

关于javascript - Ext.form.combobox 上的标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34022940/

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