Commit 486116265d418c8521ad785c571983d6e291387f

Authored by 梁灏
1 parent 517917a2

Button support global size

Showing 2 changed files with 5 additions and 1 deletions   Show diff stats
@@ -12,7 +12,8 @@ import locale from '../src/locale/lang/zh-CN'; @@ -12,7 +12,8 @@ import locale from '../src/locale/lang/zh-CN';
12 Vue.use(VueRouter); 12 Vue.use(VueRouter);
13 Vue.use(iView, { 13 Vue.use(iView, {
14 locale, 14 locale,
15 - transfer: true 15 + transfer: true,
  16 + size: 'small'
16 }); 17 });
17 18
18 // 开启debug模式 19 // 开启debug模式
src/components/button/button.vue
@@ -47,6 +47,9 @@ @@ -47,6 +47,9 @@
47 size: { 47 size: {
48 validator (value) { 48 validator (value) {
49 return oneOf(value, ['small', 'large', 'default']); 49 return oneOf(value, ['small', 'large', 'default']);
  50 + },
  51 + default () {
  52 + return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
50 } 53 }
51 }, 54 },
52 loading: Boolean, 55 loading: Boolean,