Page prop: size add default value

This commit is contained in:
梁灏 2021-09-07 11:20:38 +08:00
parent d8fdd9bb6a
commit 03a04a2690

View file

@ -115,7 +115,7 @@
}, },
size: { size: {
validator (value) { validator (value) {
return oneOf(value, ['small']); return oneOf(value, ['small', 'default']);
} }
}, },
simple: { simple: {
@ -181,7 +181,7 @@
}, },
computed: { computed: {
isSmall () { isSmall () {
return !!this.size; return this.size === 'small';
}, },
allPages () { allPages () {
const allPage = Math.ceil(this.total / this.currentPageSize); const allPage = Math.ceil(this.total / this.currentPageSize);
@ -205,7 +205,7 @@
{ {
[`${this.className}`]: !!this.className, [`${this.className}`]: !!this.className,
[`${prefixCls}-with-disabled`]: this.disabled, [`${prefixCls}-with-disabled`]: this.disabled,
'mini': !!this.size 'mini': this.size === 'small'
} }
]; ];
}, },