From 90b79a92b0bc878491d9d7d64ec732f0f50ba4a3 Mon Sep 17 00:00:00 2001
From: Tevin <tingquanren@163.com>
Date: Sat, 08 Mar 2025 18:17:22 +0800
Subject: [PATCH] 知识库文档,参数说明放弃表格改用列表

---
 plugins/infiniteScroll/CInfiniteScroll.vue |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/plugins/infiniteScroll/CInfiniteScroll.vue b/plugins/infiniteScroll/CInfiniteScroll.vue
index c822664..72bb052 100644
--- a/plugins/infiniteScroll/CInfiniteScroll.vue
+++ b/plugins/infiniteScroll/CInfiniteScroll.vue
@@ -141,6 +141,7 @@
                             // 没有数据
                             if (!options.pageTotal || options.pageTotal <= 0) {
                                 this.ending = true;
+                                this.pageTotal = 0;
                             }
                             // 有数据
                             else {
@@ -163,6 +164,8 @@
                     // 加载失败
                     fail: () => {
                         this.loading = false;
+                        this.ending = true;
+                        this.pageTotal = 0;
                         // 如果下拉刷新,还原下拉
                         if (this.touch.dargState === 2) {
                             this.touch.driftTop = 0;
@@ -299,14 +302,18 @@
             this.hanldeLoadMore();
         },
         // 刷新加载
-        $refresh() {
+        $refresh(autoStart) {
             Taro.pageScrollTo({
                 selector: '#' + this.elmId,
                 scrollTop: 0,
             });
             this.ending = false;
             this.current = 0;
-            this.hanldeLoadMore();
+            if (autoStart === 'off') {
+                this.inital = false;
+            } else {
+                this.hanldeLoadMore();
+            }
         },
     },
     mounted() {

--
Gitblit v1.9.1