Button support global size
This commit is contained in:
parent
517917a2ad
commit
486116265d
2 changed files with 5 additions and 1 deletions
|
@ -12,7 +12,8 @@ import locale from '../src/locale/lang/zh-CN';
|
||||||
Vue.use(VueRouter);
|
Vue.use(VueRouter);
|
||||||
Vue.use(iView, {
|
Vue.use(iView, {
|
||||||
locale,
|
locale,
|
||||||
transfer: true
|
transfer: true,
|
||||||
|
size: 'small'
|
||||||
});
|
});
|
||||||
|
|
||||||
// 开启debug模式
|
// 开启debug模式
|
||||||
|
|
|
@ -47,6 +47,9 @@
|
||||||
size: {
|
size: {
|
||||||
validator (value) {
|
validator (value) {
|
||||||
return oneOf(value, ['small', 'large', 'default']);
|
return oneOf(value, ['small', 'large', 'default']);
|
||||||
|
},
|
||||||
|
default () {
|
||||||
|
return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
loading: Boolean,
|
loading: Boolean,
|
||||||
|
|
Loading…
Add table
Reference in a new issue