Commit 2c384301244af2e0c53f94ee938a121618952b92

Authored by YunaiV
1 parent fb1648ec

v3.8.2 修复分页组件请求两次问题

yudao-ui-admin/src/components/Pagination/index.vue
1 1 <template>
2 2 <div :class="{'hidden':hidden}" class="pagination-container">
3 3 <el-pagination
4   - v-if="pageShow"
5 4 :background="background"
6 5 :current-page.sync="currentPage"
7 6 :page-size.sync="pageSize"
... ... @@ -64,7 +63,6 @@ export default {
64 63 },
65 64 data() {
66 65 return {
67   - pageShow: true
68 66 };
69 67 },
70 68 computed: {
... ... @@ -88,10 +86,7 @@ export default {
88 86 methods: {
89 87 handleSizeChange(val) {
90 88 if (this.currentPage * val > this.total) {
91   - this.pageShow = false;
92   - this.$nextTick(() => {
93   - this.pageShow = true
94   - })
  89 + this.currentPage = 1
95 90 }
96 91 this.$emit('pagination', { page: this.currentPage, limit: val })
97 92 if (this.autoScroll) {
... ...