Commit 381417a80627a84254cfab668d95e2d2c53e2057

Authored by 梁灏
1 parent dec9ae10

Update Button

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