From e703b41ee825c66016f5f0fb80b5564d901ae666 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期一, 28 十月 2024 15:06:19 +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..a9be127 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-if="!finishLoding&&isLoding"
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