From 35f7a4ae12924def054e199fd77e524b7896f0f3 Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Thu, 28 Jun 2018 14:18:20 +0800 Subject: [PATCH] Radio support global setting --- src/components/radio/radio-group.vue | 3 +++ src/components/radio/radio.vue | 3 +++ 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/components/radio/radio-group.vue b/src/components/radio/radio-group.vue index 59d1535..457b43d 100644 --- a/src/components/radio/radio-group.vue +++ b/src/components/radio/radio-group.vue @@ -24,6 +24,9 @@ size: { validator (value) { return oneOf(value, ['small', 'large', 'default']); + }, + default () { + return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, type: { diff --git a/src/components/radio/radio.vue b/src/components/radio/radio.vue index f50906b..8aa48d7 100644 --- a/src/components/radio/radio.vue +++ b/src/components/radio/radio.vue @@ -46,6 +46,9 @@ size: { validator (value) { return oneOf(value, ['small', 'large', 'default']); + }, + default () { + return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, name: { -- libgit2 0.21.4