You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/pagination/demo/index.vue

48 lines
1.0 KiB

<template>
<div>
<div style="margin-bottom:10px">
<pagination :simple="simple" :current="current" :total="total"></pagination>
</div>
<div style="margin-bottom:10px">
<pagination :current="current" :total="total" @change="onchange"></pagination>
<vc-button @click="changeValue"></vc-button>
</div>
<div>
<pagination v-model="current" :total="total" :showTotal="showTotal"></pagination>
<vc-button @click="changeValue"></vc-button>
<vc-button @click="getValue"></vc-button>
</div>
</div>
</template>
<script>
import '../style'
import { Pagination, Button } from 'antd/index'
export default {
data () {
return {
simple: true,
current: 1,
total: 483,
}
},
methods: {
changeValue () {
this.current = 4
},
getValue () {
alert(this.current)
},
showTotal (total) {
return `${total}`
},
onchange (page) {
alert(page)
},
},
components: {
Pagination,
vcButton: Button,
},
}
</script>