From 3d1f3cf661981e8adae42250ebef78889bb78180 Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Thu, 21 Jun 2018 09:20:15 +0800 Subject: [PATCH] close #3402 --- examples/routers/button.vue | 5 ++++- src/components/button/button.vue | 13 ++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/examples/routers/button.vue b/examples/routers/button.vue index fbf6476..fe85a11 100644 --- a/examples/routers/button.vue +++ b/examples/routers/button.vue @@ -15,7 +15,6 @@ line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - vertical-align: middle; } .i-icon-accessory:before { content: "\e6dd"; } @@ -297,6 +296,10 @@ + + + +
diff --git a/src/components/button/button.vue b/src/components/button/button.vue index 884952e..5fb6d81 100644 --- a/src/components/button/button.vue +++ b/src/components/button/button.vue @@ -5,7 +5,7 @@ :disabled="disabled" @click="handleClick"> - + @@ -42,7 +42,14 @@ return oneOf(value, ['button', 'submit', 'reset']); } }, - icon: String, + icon: { + type: String, + default: '' + }, + customIcon: { + type: String, + default: '' + }, long: { type: Boolean, default: false @@ -63,7 +70,7 @@ [`${prefixCls}-${this.shape}`]: !!this.shape, [`${prefixCls}-${this.size}`]: !!this.size, [`${prefixCls}-loading`]: this.loading != null && this.loading, - [`${prefixCls}-icon-only`]: !this.showSlot && (!!this.icon || this.loading) + [`${prefixCls}-icon-only`]: !this.showSlot && (!!this.icon || !!this.customIcon || this.loading) } ]; } -- libgit2 0.21.4