From a7e1c2d66b232dcfb24ef03ce285c144ff18ba91 Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Thu, 28 Jun 2018 14:41:32 +0800 Subject: [PATCH] Cascader support global setting --- src/components/cascader/cascader.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/cascader/cascader.vue b/src/components/cascader/cascader.vue index bd0da1f..27b4220 100644 --- a/src/components/cascader/cascader.vue +++ b/src/components/cascader/cascader.vue @@ -97,7 +97,10 @@ }, size: { validator (value) { - return oneOf(value, ['small', 'large']); + return oneOf(value, ['small', 'large', 'default']); + }, + default () { + return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, trigger: { @@ -128,7 +131,9 @@ }, transfer: { type: Boolean, - default: false + default () { + return this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; + } }, name: { type: String -- libgit2 0.21.4