WXL (wul)
8 天以前 a99e82da2b087d7019cdce015c25befc620b9d61
src/components/Pagination/index.vue
@@ -1,3 +1,5 @@
<!-- 底部分页组件封装 -->
<template>
  <div :class="{'hidden':hidden}" class="pagination-container">
    <el-pagination
@@ -16,6 +18,7 @@
</template>
<script>
// 待定
import { scrollTo } from '@/utils/scroll-to'
export default {
@@ -76,7 +79,10 @@
    },
    pageSize: {
      get() {
        return this.limit
        // limit 可能被“导出”等操作临时置为 null,直接透传会让 el-pagination 算出
        // pageCount = total / 0 = Infinity,页码里就出现 “infinity”。这里兜底成 10
        const size = Number(this.limit)
        return size > 0 ? size : 10
      },
      set(val) {
        this.$emit('update:limit', val)