mirror of https://github.com/ElemeFE/element
Merge pull request #2497 from QingWei-Li/fix/radiogroup/value
RadioGroup: allow boolean value, fixed #2442pull/2505/head
commit
5e23dd3cd5
|
@ -65,7 +65,7 @@ Radio should not have too many options. Otherwise, use the Select component inst
|
||||||
|
|
||||||
### Radio button group
|
### Radio button group
|
||||||
|
|
||||||
Suitable for choosing from some mutually exclusive options.
|
Suitable for choosing from some mutually exclusive options.
|
||||||
|
|
||||||
:::demo Combine `<el-radio-group>` with `<el-radio>` to display a radio group. Bind a variable with `v-model` of `<el-radio-group>` element and set label value in `<el-radio>`. It also provides `change` event with the current value as its parameter.
|
:::demo Combine `<el-radio-group>` with `<el-radio>` to display a radio group. Bind a variable with `v-model` of `<el-radio-group>` element and set label value in `<el-radio>`. It also provides `change` event with the current value as its parameter.
|
||||||
|
|
||||||
|
@ -131,15 +131,15 @@ Radio with button styles.
|
||||||
|
|
||||||
### Radio Attributes
|
### Radio Attributes
|
||||||
|
|
||||||
Attribute | Description | Type | Accepted Values | Default
|
Attribute | Description | Type | Accepted Values | Default
|
||||||
---- | ---- | ---- | ---- | ----
|
---- | ---- | ---- | ---- | ----
|
||||||
label | the value of radio | string/number | — | —
|
label | the value of radio | string/number/boolean | — | —
|
||||||
disabled | whether radio is disabled | boolean | — | false
|
disabled | whether radio is disabled | boolean | — | false
|
||||||
name | native 'name' attribute | string | — | —
|
name | native 'name' attribute | string | — | —
|
||||||
|
|
||||||
### Radio-group Attributes
|
### Radio-group Attributes
|
||||||
|
|
||||||
Attribute | Description | Type | Accepted Values | Default
|
Attribute | Description | Type | Accepted Values | Default
|
||||||
---- | ---- | ---- | ---- | ----
|
---- | ---- | ---- | ---- | ----
|
||||||
size | the size of radio buttons | string | large/small | —
|
size | the size of radio buttons | string | large/small | —
|
||||||
fill | border and background color when button is active | string | — | #20a0ff |
|
fill | border and background color when button is active | string | — | #20a0ff |
|
||||||
|
@ -153,7 +153,7 @@ change | triggers when the bound value changes | the label value of the chosen r
|
||||||
|
|
||||||
### Radio-button Attributes
|
### Radio-button Attributes
|
||||||
|
|
||||||
Attribute | Description | Type | Accepted Values | Default
|
Attribute | Description | Type | Accepted Values | Default
|
||||||
---- | ---- | ---- | ---- | ----
|
---- | ---- | ---- | ---- | ----
|
||||||
label | the value of radio | string/number | — | —
|
label | the value of radio | string/number | — | —
|
||||||
disabled | whether radio is disabled | boolean | — | false
|
disabled | whether radio is disabled | boolean | — | false
|
||||||
|
|
|
@ -137,7 +137,7 @@
|
||||||
### Radio Attributes
|
### Radio Attributes
|
||||||
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|
||||||
|---------- |-------- |---------- |------------- |-------- |
|
|---------- |-------- |---------- |------------- |-------- |
|
||||||
| label | Radio 的 value | string,number | — | — |
|
| label | Radio 的 value | string,number,boolean | — | — |
|
||||||
| disabled | 是否禁用 | boolean | — | false |
|
| disabled | 是否禁用 | boolean | — | false |
|
||||||
| name | 原生 name 属性 | string | — | — |
|
| name | 原生 name 属性 | string | — | — |
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
mixins: [Emitter],
|
mixins: [Emitter],
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
value: [String, Number],
|
value: {},
|
||||||
size: String,
|
size: String,
|
||||||
fill: String,
|
fill: String,
|
||||||
textColor: String,
|
textColor: String,
|
||||||
|
|
Loading…
Reference in New Issue