在extjs中显示无线电字段



我有两个单选按钮选项,其中一个旁边有一个文本字段。显示了旁边带有文本区域的无线电场。然而,第一个无线电场(小)没有显示出来。有什么帮助吗?

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 array覆盖第一个items array。每个容器/包装器只能有一个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'
        }]
    }
});

最新更新