RadioButtonGroup 组件定义一组 RadioButton 组件,这些组件相互排斥;因此,用户每次只能选择一个 RadioButton 组件
Event.CHANGE 此组中所选 RadioButton 组件的值更改时分派。
Egret 2.4
eui 1.0
Web
extension/eui/components/RadioButtonGroupExample.ts
zh_CN
构造函数。
确定是否允许选择。请注意,返回的值仅反映对 RadioButtonGroup 显式设置的值, 而不反映对各个 RadioButton 显式设置的任何值。
RadioButtonGroup
true Copy
true
属于此 RadioButtonGroup 的 RadioButton 数。
0 Copy
0
组中所选 RadioButton 组件的 value 属性(如果未设置), 否则为所选 RadioButton 组件的 label 属性。 如果未选择任何 RadioButton,则此属性为 null。
value
label
null
如果设置了 selectedValue,则会选择 value 或 label 属性 与此值匹配的第一个 RadioButton 组件。
selectedValue
null Copy
当前被选中的单选按钮引用。此属性仅当目标RadioButton在显示列表时有效。
返回指定索引处的 RadioButton 组件。
RadioButtonGroup 中的 RadioButton 的从零开始的索引。
当索引位于 0 和 numRadioButtons 之间时,指定的 RadioButton 组件为 1。 如果索引无效,则返回 null。
numRadioButtons
eui.RadioButtonGroup#numRadioButtons
RadioButtonGroup 组件定义一组 RadioButton 组件,这些组件相互排斥;因此,用户每次只能选择一个 RadioButton 组件
Event.CHANGE 此组中所选 RadioButton 组件的值更改时分派。
Version
Egret 2.4
Version
eui 1.0
Platform
Web
Include Example
extension/eui/components/RadioButtonGroupExample.ts
Language
zh_CN