From da498efb165dbada586396baecc71c644e46b1e8 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期二, 23 七月 2024 14:00:41 +0800
Subject: [PATCH] 交接时选择试验室

---
 src/components/tool/scroll-paging.vue |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/components/tool/scroll-paging.vue b/src/components/tool/scroll-paging.vue
index 41b2e10..7b40949 100644
--- a/src/components/tool/scroll-paging.vue
+++ b/src/components/tool/scroll-paging.vue
@@ -2,14 +2,14 @@
   <div class="scroll-pagination"  ref="content" @scroll="onScroll">
     <slot></slot>
     <el-button
-        v-if="isLoding"
+        v-show="isLoding&&!finishLoding"
         type="text"
         style="display: flex; margin: 0 auto; color: #909399"
         ><i class="el-icon-loading" style="font-size:20px"></i
       ></el-button>
     <el-button
       type="text"
-      v-if="finishLoding"
+      v-show="finishLoding"
       style="display: flex; margin: 0 auto; color: #909399"
       >宸茬粡娌℃湁鏇村鍟</el-button
     >
@@ -23,6 +23,19 @@
     finishLoding: {
       type:Boolean,
       default:false
+    },
+    list:{
+      type:Array,
+      default:()=>[]
+    }
+  },
+  watch: {
+    list:{
+      deep:true,
+      handler(){
+        this.isLoding = false
+        console.log(this.isLoding)
+      }
     }
   },
   data() {
@@ -32,7 +45,7 @@
   },
   created(){
     // 闃叉姈
-    this.onScroll = this.debounce(this.scrollFn,2000);
+    this.onScroll = this.debounce(this.scrollFn,500);
     // 鑺傛祦
     // this.onScroll = this.throttle(this.scrollFn,1000);
   },
@@ -55,8 +68,7 @@
       this.isLoding = true
       setTimeout(() => {
         this.$emit('load')
-        this.isLoding = false
-      }, 1000)
+      }, 500)
     },
     debounce(func, delay) {
       let timer = null;

--
Gitblit v1.9.3