mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-11-30 02:57:50 +08:00
pagination showTotal
This commit is contained in:
parent
192a3fb1d6
commit
b838be1d3e
@ -8,7 +8,7 @@
|
|||||||
<vc-button @click="changeValue">改值</vc-button>
|
<vc-button @click="changeValue">改值</vc-button>
|
||||||
</div>
|
</div>
|
||||||
<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="changeValue">改值</vc-button>
|
||||||
<vc-button @click="getValue">当前值</vc-button>
|
<vc-button @click="getValue">当前值</vc-button>
|
||||||
</div>
|
</div>
|
||||||
@ -22,7 +22,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
simple: true,
|
simple: true,
|
||||||
current: 1,
|
current: 1,
|
||||||
total: 500,
|
total: 483,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -32,6 +32,9 @@ export default {
|
|||||||
getValue () {
|
getValue () {
|
||||||
alert(this.current)
|
alert(this.current)
|
||||||
},
|
},
|
||||||
|
showTotal (total) {
|
||||||
|
return `共 ${total} 条`
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Pagination,
|
Pagination,
|
||||||
|
@ -52,6 +52,7 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
showTotal: Function,
|
||||||
},
|
},
|
||||||
model: {
|
model: {
|
||||||
prop: 'current',
|
prop: 'current',
|
||||||
|
Loading…
Reference in New Issue
Block a user