doum
2025-09-26 9057e04efad1b7d61c77a72e5c37a504d0aee935
admin/src/components/common/Pagination.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,50 @@
<template>
  <div class="table-pagination">
    <el-pagination
      :current-page="pagination.pageIndex"
      :page-sizes="[10, 20, 30, 40]"
      :page-size="pagination.pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="pagination.total"
      @size-change="sizeChange"
      @current-change="currentChange"
      background>
    </el-pagination>
  </div>
</template>
<script>
export default {
  name: 'Pagination',
  props: {
    pagination: {
      type: Object,
      default: function () {
        return {}
      }
    }
  },
  data () {
    return {
    }
  },
  methods: {
    /**
     * é¡µå®¹é‡å˜æ›´
     *
     * @param value æ–°é¡µå®¹é‡
     */
    sizeChange (value) {
      this.$emit('size-change', value)
    },
    /**
     * é¡µç å˜æ›´
     *
     * @param value æ–°é¡µç 
     */
    currentChange (value) {
      this.$emit('current-change', value)
    }
  }
}
</script>