pagination.vue 794 Bytes
Newer Older
xulili's avatar
xulili committed
1 2 3 4
<template>
    <div class="partyt-pagination">
         <el-pagination
            @current-change="handleCurrentChange"
qzhxx's avatar
qzhxx committed
5 6
            :current-page.sync="page._index"
            :page-size="page._size"
xulili's avatar
xulili committed
7
            layout="prev, pager, next, jumper"
qzhxx's avatar
qzhxx committed
8
            :total="page.total">
xulili's avatar
xulili committed
9 10 11 12 13 14 15 16 17 18 19
         </el-pagination> 
    </div>
</template>
<script>
export default {
    data(){
        return {
            currentPage:1
        }
    },
    props:{
qzhxx's avatar
qzhxx committed
20 21 22 23 24 25 26
        page:{
            type: Object,
            default:{
                _index:1,
                _size:10,
                total:0
            }
xulili's avatar
xulili committed
27 28 29 30
        }
    },
    methods:{
        handleCurrentChange(val){
qzhxx's avatar
qzhxx committed
31
           this.$emit('changePage',val)
xulili's avatar
xulili committed
32 33 34
        }
    }
}
35 36 37 38
</script>
<style lang="less">
  @import '../style/pagination.less';
</style>