From 22111588976de090bec759ff53d68323bf223255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=81=8F?= Date: Thu, 28 Jun 2018 14:23:51 +0800 Subject: [PATCH] Switch support global setting --- src/components/switch/switch.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/switch/switch.vue b/src/components/switch/switch.vue index 0780ed91..c279a4f4 100644 --- a/src/components/switch/switch.vue +++ b/src/components/switch/switch.vue @@ -41,6 +41,9 @@ size: { validator (value) { return oneOf(value, ['large', 'small', 'default']); + }, + default () { + return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, name: {