diff --git a/src/components/button/button-group.vue b/src/components/button/button-group.vue index 55f72ff2..d1f54964 100644 --- a/src/components/button/button-group.vue +++ b/src/components/button/button-group.vue @@ -14,6 +14,9 @@ size: { validator (value) { return oneOf(value, ['small', 'large', 'default']); + }, + default () { + return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, shape: { diff --git a/src/components/button/button.vue b/src/components/button/button.vue index 55eb78f3..76e0fcef 100644 --- a/src/components/button/button.vue +++ b/src/components/button/button.vue @@ -86,11 +86,11 @@ classes () { return [ `${prefixCls}`, + `${prefixCls}-${this.type}`, { - [`${prefixCls}-${this.type}`]: !!this.type, [`${prefixCls}-long`]: this.long, [`${prefixCls}-${this.shape}`]: !!this.shape, - [`${prefixCls}-${this.size}`]: !!this.size, + [`${prefixCls}-${this.size}`]: this.size !== 'default', [`${prefixCls}-loading`]: this.loading != null && this.loading, [`${prefixCls}-icon-only`]: !this.showSlot && (!!this.icon || !!this.customIcon || this.loading), [`${prefixCls}-ghost`]: this.ghost