From 9e1758c1d81c3c70f0c75dafcd51df748edb8010 Mon Sep 17 00:00:00 2001 From: neverland Date: Sun, 22 Sep 2019 18:29:27 +0800 Subject: [PATCH] feat(RadioGroup): add checked-color prop (#4532) --- src/radio-group/index.js | 1 + src/radio/README.md | 3 ++- src/radio/README.zh-CN.md | 3 ++- src/radio/test/__snapshots__/index.spec.js.snap | 17 +++++++++++++---- src/radio/test/index.spec.js | 14 +++++++++++++- 5 files changed, 31 insertions(+), 7 deletions(-) diff --git a/src/radio-group/index.js b/src/radio-group/index.js index 13c6c8cfb..10f64d44f 100644 --- a/src/radio-group/index.js +++ b/src/radio-group/index.js @@ -9,6 +9,7 @@ export default createComponent({ props: { value: null, disabled: Boolean, + checkedColor: String, iconSize: [Number, String] }, diff --git a/src/radio/README.md b/src/radio/README.md index 58dd6af73..0649c2172 100644 --- a/src/radio/README.md +++ b/src/radio/README.md @@ -114,9 +114,9 @@ export default { | name | Radio name | *any* | - | - | | shape | Can be set to `square` | *string* | `round` | - | | disabled | Whether to disable radio | *boolean* | `false` | - | -| icon-size | Icon size | *string \| number* | `20px` | - | | label-disabled | Whether to disable label click | *boolean* | `false` | - | | label-position | Can be set to `left` | *string* | `right` | - | +| icon-size | Icon size | *string \| number* | `20px` | - | | checked-color | Checked color | *string* | `#1989fa` | - | - | ### RadioGroup Props @@ -126,6 +126,7 @@ export default { | v-model | Name of checked radio | *any* | - | - | | disabled | Disable all radios | *boolean* | `false` | - | | icon-size | Icon size of all radios | *string \| number* | `20px` | 2.2.3 | +| checked-color | Checked color of all radios | *string* | `#1989fa` | - | 2.2.3 | ### Radio Events diff --git a/src/radio/README.zh-CN.md b/src/radio/README.zh-CN.md index 516a85222..be9334088 100644 --- a/src/radio/README.zh-CN.md +++ b/src/radio/README.zh-CN.md @@ -118,9 +118,9 @@ export default { | name | 标识符 | *any* | - | - | | shape | 形状,可选值为 `square` | *string* | `round` | - | | disabled | 是否为禁用状态 | *boolean* | `false` | - | -| icon-size | 当前单选框的图标大小,默认单位为`px` | *string \| number* | `20px` | - | | label-disabled | 是否禁用文本内容点击 | *boolean* | `false` | - | | label-position | 文本位置,可选值为 `left` | *string* | `right` | - | +| icon-size | 图标大小,默认单位为`px` | *string \| number* | `20px` | - | | checked-color | 选中状态颜色 | *string* | `#1989fa` | - | ### RadioGroup Props @@ -130,6 +130,7 @@ export default { | v-model | 当前选中项的标识符 | *any* | - | - | | disabled | 是否禁用所有单选框 | *boolean* | `false` | - | | icon-size | 所有单选框的图标大小,默认单位为`px` | *string \| number* | `20px` | 2.2.3 | +| checked-color | 所有单选框的选中状态颜色 | *string* | `#1989fa` | 2.2.3 | ### Radio Events diff --git a/src/radio/test/__snapshots__/index.spec.js.snap b/src/radio/test/__snapshots__/index.spec.js.snap index 2d3175c50..1b989092a 100644 --- a/src/radio/test/__snapshots__/index.spec.js.snap +++ b/src/radio/test/__snapshots__/index.spec.js.snap @@ -1,11 +1,20 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`checked-color prop 1`] = ` +
+ + +
+`; + exports[`icon-size prop 1`] = `
-