Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/404.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript extjs如何创建带有单选按钮的菜单_Javascript_Extjs_Menu - Fatal编程技术网

Javascript extjs如何创建带有单选按钮的菜单

Javascript extjs如何创建带有单选按钮的菜单,javascript,extjs,menu,Javascript,Extjs,Menu,我可以创建带有复选框的菜单,如下所示 xtype : 'button', id : 'resultExportBtn', ui : 'custombtn', cls : 'field-margin', style : 'margin-right:5px', text : 'Export', menu : [ { text : 'CSV', fName : 'csv', checked : true, xtype : 'me

我可以创建带有复选框的菜单,如下所示

xtype : 'button',
id : 'resultExportBtn',
ui : 'custombtn',
cls : 'field-margin',
style : 'margin-right:5px',
text : 'Export',
menu : [ 
    {
        text : 'CSV',
        fName : 'csv',
        checked : true,
        xtype : 'menucheckitem'
    }, {
        text : 'PDF',
        fName : 'pdf',
        checked : false,
        xtype : 'menucheckitem'
    }
]

有人知道如何用单选按钮创建菜单吗?

使用radiogroup xtype代替menucheckitem

menu : [ 
    {
        xtype: 'radiogroup',
        columns: 1,
        vertical: true,
        items: [
            { 
                boxLabel: 'CSV', 
                name: 'rb', 
                inputValue: '1' 
            },
            { 
                boxLabel: 'PDF', 
                name: 'rb', 
                inputValue: '2' 
            }           
        ]
    }
]