From 55238beb0162ab15e0cd1f2410c247ddc140f88e Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Thu, 28 Jun 2018 15:00:09 +0800 Subject: [PATCH] Avatar support global setting --- src/components/avatar/avatar.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/avatar/avatar.vue b/src/components/avatar/avatar.vue index 075aab3..9cdc45a 100644 --- a/src/components/avatar/avatar.vue +++ b/src/components/avatar/avatar.vue @@ -25,7 +25,9 @@ validator (value) { return oneOf(value, ['small', 'large', 'default']); }, - default: 'default' + default () { + return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; + } }, src: { type: String -- libgit2 0.21.4