正在显示
1 个修改的文件
包含
12 行增加
和
0 行删除
| 1 | <template> | 1 | <template> |
| 2 | <div :class="{'hidden':hidden}" class="pagination-container"> | 2 | <div :class="{'hidden':hidden}" class="pagination-container"> |
| 3 | <el-pagination | 3 | <el-pagination |
| 4 | + v-if="pageShow" | ||
| 4 | :background="background" | 5 | :background="background" |
| 5 | :current-page.sync="currentPage" | 6 | :current-page.sync="currentPage" |
| 6 | :page-size.sync="pageSize" | 7 | :page-size.sync="pageSize" |
| @@ -61,6 +62,11 @@ export default { | @@ -61,6 +62,11 @@ export default { | ||
| 61 | default: false | 62 | default: false |
| 62 | } | 63 | } |
| 63 | }, | 64 | }, |
| 65 | + data() { | ||
| 66 | + return { | ||
| 67 | + pageShow: true | ||
| 68 | + }; | ||
| 69 | + }, | ||
| 64 | computed: { | 70 | computed: { |
| 65 | currentPage: { | 71 | currentPage: { |
| 66 | get() { | 72 | get() { |
| @@ -81,6 +87,12 @@ export default { | @@ -81,6 +87,12 @@ export default { | ||
| 81 | }, | 87 | }, |
| 82 | methods: { | 88 | methods: { |
| 83 | handleSizeChange(val) { | 89 | handleSizeChange(val) { |
| 90 | + if (this.currentPage * val > this.total) { | ||
| 91 | + this.pageShow = false; | ||
| 92 | + this.$nextTick(() => { | ||
| 93 | + this.pageShow = true | ||
| 94 | + }) | ||
| 95 | + } | ||
| 84 | this.$emit('pagination', { page: this.currentPage, limit: val }) | 96 | this.$emit('pagination', { page: this.currentPage, limit: val }) |
| 85 | if (this.autoScroll) { | 97 | if (this.autoScroll) { |
| 86 | scrollTo(0, 800) | 98 | scrollTo(0, 800) |
-
请 注册 或 登录 后发表评论