Commit 381417a80627a84254cfab668d95e2d2c53e2057

Authored by 梁灏
1 parent dec9ae10

Update Button

src/components/button/button-group.vue
@@ -14,6 +14,9 @@ @@ -14,6 +14,9 @@
14 size: { 14 size: {
15 validator (value) { 15 validator (value) {
16 return oneOf(value, ['small', 'large', 'default']); 16 return oneOf(value, ['small', 'large', 'default']);
  17 + },
  18 + default () {
  19 + return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
17 } 20 }
18 }, 21 },
19 shape: { 22 shape: {
src/components/button/button.vue
@@ -86,11 +86,11 @@ @@ -86,11 +86,11 @@
86 classes () { 86 classes () {
87 return [ 87 return [
88 `${prefixCls}`, 88 `${prefixCls}`,
  89 + `${prefixCls}-${this.type}`,
89 { 90 {
90 - [`${prefixCls}-${this.type}`]: !!this.type,  
91 [`${prefixCls}-long`]: this.long, 91 [`${prefixCls}-long`]: this.long,
92 [`${prefixCls}-${this.shape}`]: !!this.shape, 92 [`${prefixCls}-${this.shape}`]: !!this.shape,
93 - [`${prefixCls}-${this.size}`]: !!this.size, 93 + [`${prefixCls}-${this.size}`]: this.size !== 'default',
94 [`${prefixCls}-loading`]: this.loading != null && this.loading, 94 [`${prefixCls}-loading`]: this.loading != null && this.loading,
95 [`${prefixCls}-icon-only`]: !this.showSlot && (!!this.icon || !!this.customIcon || this.loading), 95 [`${prefixCls}-icon-only`]: !this.showSlot && (!!this.icon || !!this.customIcon || this.loading),
96 [`${prefixCls}-ghost`]: this.ghost 96 [`${prefixCls}-ghost`]: this.ghost