From 1c4ff7adf79cd9abc1ea644a3161780a623b9f5c Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 26 十一月 2025 16:43:31 +0800
Subject: [PATCH] 1.湟水峡-生产订单不和销售关联逻辑修改联调

---
 src/components/Pagination/index.vue |   21 ++++++++-------------
 1 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue
index 906f4b0..2287c0c 100644
--- a/src/components/Pagination/index.vue
+++ b/src/components/Pagination/index.vue
@@ -1,12 +1,11 @@
 <template>
   <div :class="{ 'hidden': hidden }" class="pagination-container">
     <el-pagination
-      v-if="pageShow"
       :background="background"
-      v-model:current-page="currentPage"
-      v-model:page-size="pageSize"
+      v-model:currentPage="currentPage"
+      v-model:pageSize="pageSize"
       :layout="layout"
-      :page-sizes="pageSizes"
+      :page-size-options="pageSizes"
       :pager-count="pagerCount"
       :total="total"
       @size-change="handleSizeChange"
@@ -16,9 +15,8 @@
 </template>
 
 <script setup>
+import { computed } from 'vue'
 import { scrollTo } from '@/utils/scroll-to'
-
-const pageShow = ref(true);
 
 const props = defineProps({
   total: {
@@ -62,7 +60,7 @@
   }
 })
 
-const emit = defineEmits();
+const emit = defineEmits()
 const currentPage = computed({
   get() {
     return props.page
@@ -79,31 +77,28 @@
     emit('update:limit', val)
   }
 })
+
 function handleSizeChange(val) {
   if (currentPage.value * val > props.total) {
-    pageShow.value = false;
-    nextTick(() => {
-      pageShow.value = true
-    })
+    currentPage.value = 1
   }
   emit('pagination', { page: currentPage.value, limit: val })
   if (props.autoScroll) {
     scrollTo(0, 800)
   }
 }
+
 function handleCurrentChange(val) {
   emit('pagination', { page: val, limit: pageSize.value })
   if (props.autoScroll) {
     scrollTo(0, 800)
   }
 }
-
 </script>
 
 <style scoped>
 .pagination-container {
   background: #fff;
-  padding: 32px 16px;
 }
 .pagination-container.hidden {
   display: none;

--
Gitblit v1.9.3