pagination showTotal

pull/9/head
wangxueliang 2017-11-07 14:16:17 +08:00
parent 94fe1545c4
commit 205c9345d6
2 changed files with 6 additions and 2 deletions

View File

@ -8,7 +8,7 @@
<vc-button @click="changeValue"></vc-button>
</div>
<div>
<pagination v-model="current" :total="total"></pagination>
<pagination v-model="current" :total="total" :showTotal="showTotal"></pagination>
<vc-button @click="changeValue"></vc-button>
<vc-button @click="getValue"></vc-button>
</div>
@ -22,7 +22,7 @@ export default {
return {
simple: true,
current: 1,
total: 500,
total: 483,
}
},
methods: {
@ -32,6 +32,9 @@ export default {
getValue () {
alert(this.current)
},
showTotal (total) {
return `${total}`
},
},
components: {
Pagination,

View File

@ -52,6 +52,7 @@ export default {
type: Boolean,
default: true,
},
showTotal: Function,
},
model: {
prop: 'current',