From 35f7a4ae12924def054e199fd77e524b7896f0f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=81=8F?= 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(+) diff --git a/src/components/radio/radio-group.vue b/src/components/radio/radio-group.vue index 59d15355..457b43d7 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 f50906b9..8aa48d7c 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: {