gpt4 book ai didi

javascript - 在 extjs 中显示单选字段

转载 作者:行者123 更新时间:2023-11-27 23:50:20 24 4
gpt4 key购买 nike

我有两个单选按钮选项,其中一个旁边有一个文本字段。旁边有文本区域的单选字段正在显示。然而,第一个 radio 场(小)没有显示。有什么帮助可以解释为什么吗?

size= Ext.create('Ext.form.Panel', {
xtype: 'fieldset',
flex: 1,
defaultType: 'radio',
width:'100%',
border:false,

items: {
checked: true,
boxLabel: 'Small',
name: 's',
inputValue: 'small',

},

layout: 'hbox',
items: [
{
boxLabel: 'Large',
name: 's',
inputValue: 'l',
},
{
xtype: 'splitter'
},
{
xtype: 'textfield',
name: 'specify'

}
]
});

最佳答案

在 hbox 周围放置一个容器。现在,您可以使用第二个 items 数组 覆盖第一个 items 数组。每个容器/包装器只能有一个items array

size= Ext.create('Ext.form.Panel', {
xtype: 'fieldset',
flex: 1,
defaultType: 'radio',
width:'100%',
border:false,
items: {
checked: true,
boxLabel: 'Small',
name: 's',
inputValue: 'small'
}, {
xtype: 'container',
layout: 'hbox',
items: [
{
boxLabel: 'Large',
name: 's',
inputValue: 'l',
},
{
xtype: 'splitter'
},
{
xtype: 'textfield',
name: 'specify'
}]
}
});

关于javascript - 在 extjs 中显示单选字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32769460/

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