diff --git a/examples/main.js b/examples/main.js index 54abbbd..9661399 100644 --- a/examples/main.js +++ b/examples/main.js @@ -12,7 +12,8 @@ import locale from '../src/locale/lang/zh-CN'; Vue.use(VueRouter); Vue.use(iView, { locale, - transfer: true + transfer: true, + size: 'small' }); // 开启debug模式 diff --git a/src/components/button/button.vue b/src/components/button/button.vue index 81228bc..55eb78f 100644 --- a/src/components/button/button.vue +++ b/src/components/button/button.vue @@ -47,6 +47,9 @@ size: { validator (value) { return oneOf(value, ['small', 'large', 'default']); + }, + default () { + return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, loading: Boolean, -- libgit2 0.21.4