From 4d5454208340462d4a483ccca24205e2e2d66fdf Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Thu, 24 Aug 2017 17:50:30 +0800 Subject: [PATCH] Radio add size prop --- examples/routers/radio.vue | 56 +++++++++++++++++++++++++++++++++++++++----------------- src/components/radio/radio-group.vue | 3 ++- src/components/radio/radio.vue | 10 ++++++++-- src/styles/components/radio.less | 24 ++++++++++++++++++++++++ src/styles/mixins/checkbox.less | 1 - 5 files changed, 73 insertions(+), 21 deletions(-) diff --git a/examples/routers/radio.vue b/examples/routers/radio.vue index a495fcf..b4e6e21 100644 --- a/examples/routers/radio.vue +++ b/examples/routers/radio.vue @@ -1,32 +1,54 @@ diff --git a/src/components/radio/radio-group.vue b/src/components/radio/radio-group.vue index 5f16194..a6e8b80 100644 --- a/src/components/radio/radio-group.vue +++ b/src/components/radio/radio-group.vue @@ -19,7 +19,7 @@ }, size: { validator (value) { - return oneOf(value, ['small', 'large']); + return oneOf(value, ['small', 'large', 'default']); } }, type: { @@ -44,6 +44,7 @@ `${prefixCls}`, { [`${prefixCls}-${this.size}`]: !!this.size, + [`ivu-radio-${this.size}`]: !!this.size, [`${prefixCls}-${this.type}`]: !!this.type, [`${prefixCls}-vertical`]: this.vertical } diff --git a/src/components/radio/radio.vue b/src/components/radio/radio.vue index 32a6e47..9d17ac7 100644 --- a/src/components/radio/radio.vue +++ b/src/components/radio/radio.vue @@ -12,7 +12,7 @@