From 1fe436fc8c024eaf899ac8c79085eb9e7e0774f4 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Wed, 18 Jan 2017 15:12:26 +0800 Subject: [PATCH] RadioGroup: allow boolean value, fixed #2442 --- examples/docs/en-US/radio.md | 12 ++++++------ examples/docs/zh-CN/radio.md | 2 +- packages/radio/src/radio-group.vue | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/docs/en-US/radio.md b/examples/docs/en-US/radio.md index d01071a93..3533ea543 100644 --- a/examples/docs/en-US/radio.md +++ b/examples/docs/en-US/radio.md @@ -65,7 +65,7 @@ Radio should not have too many options. Otherwise, use the Select component inst ### Radio button group -Suitable for choosing from some mutually exclusive options. +Suitable for choosing from some mutually exclusive options. :::demo Combine `` with `` to display a radio group. Bind a variable with `v-model` of `` element and set label value in ``. It also provides `change` event with the current value as its parameter. @@ -131,15 +131,15 @@ Radio with button styles. ### 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 -name | native 'name' attribute | string | — | — +name | native 'name' attribute | string | — | — ### Radio-group Attributes - Attribute | Description | Type | Accepted Values | Default + Attribute | Description | Type | Accepted Values | Default ---- | ---- | ---- | ---- | ---- size | the size of radio buttons | string | large/small | — 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 - Attribute | Description | Type | Accepted Values | Default + Attribute | Description | Type | Accepted Values | Default ---- | ---- | ---- | ---- | ---- label | the value of radio | string/number | — | — disabled | whether radio is disabled | boolean | — | false diff --git a/examples/docs/zh-CN/radio.md b/examples/docs/zh-CN/radio.md index 01fd3882a..858135bd1 100644 --- a/examples/docs/zh-CN/radio.md +++ b/examples/docs/zh-CN/radio.md @@ -137,7 +137,7 @@ ### Radio Attributes | 参数 | 说明 | 类型 | 可选值 | 默认值 | |---------- |-------- |---------- |------------- |-------- | -| label | Radio 的 value | string,number | — | — | +| label | Radio 的 value | string,number,boolean | — | — | | disabled | 是否禁用 | boolean | — | false | | name | 原生 name 属性 | string | — | — | diff --git a/packages/radio/src/radio-group.vue b/packages/radio/src/radio-group.vue index 16f5d6a8a..72486a8d9 100644 --- a/packages/radio/src/radio-group.vue +++ b/packages/radio/src/radio-group.vue @@ -14,7 +14,7 @@ mixins: [Emitter], props: { - value: [String, Number], + value: {}, size: String, fill: String, textColor: String,