update Page component

change Page select size in mini type
This commit is contained in:
梁灏 2016-10-25 09:10:02 +08:00
parent b7cf983e43
commit 6932b4d73c
6 changed files with 16 additions and 6 deletions

View file

@ -56,6 +56,7 @@
:_current.once="current"
:current.sync="current"
:all-pages="allPages"
:is-small="isSmall"
@on-size="onSize"
@on-page="onPage">
</Options>
@ -116,6 +117,9 @@
}
},
computed: {
isSmall () {
return !!this.size;
},
allPages () {
const allPage = Math.ceil(this.total / this.pageSize);
return (allPage === 0) ? 1 : allPage;