1.0.0 • Published 4 years ago

vue-wengochen-pagination v1.0.0

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

安装

npm i vue-wengochen-pagination --save

引入

//main.js

import Pagination from "vue-wengochen-pagination"
Vue.use(Pagination)

简单使用

<template>
  <div class="parent">
    <pagination @changePage="changePage" :count="count" 
      background="true" jumper="true">
    
    </pagination>
  </div>
</template>

<script>
  export default {
    name: 'Parent',
    data(){
      return {
        page:1,
        count:10
      }
    },
    methods:{
      changePage(value){
        this.page = value
        //...逻辑:转页,让页面显示第几页
      }
    }
  }
</script>

参数

count:总共多少页
background:布尔值,是否添加背景颜色
jumper:布尔值,是否添加转页器
changePage():page改变引起的事件