From ae3577a604988e84d22fc299ddd6dae25b5edf57 Mon Sep 17 00:00:00 2001 From: value <z1292839451@163.com> Date: 星期三, 15 五月 2024 02:14:17 +0800 Subject: [PATCH] 部分调整;标准库分页修改 --- src/components/view/index-index.vue | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/components/view/index-index.vue b/src/components/view/index-index.vue index 4ccf7c5..7c0fc28 100644 --- a/src/components/view/index-index.vue +++ b/src/components/view/index-index.vue @@ -378,7 +378,7 @@ <div class="tab-item" style="cursor: pointer;" :class="{active:currentIndex==5}" @click="currentIndex=5">閫氱煡閫氬憡</div> </div> <div class="right-3-list" v-loading="listLoading"> - <scroll-pagination @load="getList" :finishLoding="finishLoding"> + <scroll-pagination @load="getList" :finishLoding="finishLoding" :list="list"> <div class="list3-item" v-for="(m,i) in list" :key="i"> <div class="list3-item-title"> <img src="../../../static/img/index-tip.svg" alt=""> @@ -464,7 +464,8 @@ total: null, listLoading: true, // 缁勪欢loading鐨勫睍绀�,榛樿涓簍rue finishLoding: false, // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡 - timer:null + timer:null, + keyMap:{}, } }, watch:{ @@ -472,6 +473,7 @@ this.getScheduleByMe() }, currentIndex(){ + this.keyMap = {} this.currentPage = 1; this.list = []; this.getList(); @@ -486,6 +488,7 @@ this.weekdays = this.getWeekdaysForNextWeek() this.init(); this.currentPage = 1; + this.keyMap = {} this.list = []; this.getList(); this.getScheduleByMe() @@ -493,6 +496,7 @@ this.timer = setInterval(() => { this.init(); this.currentPage = 1; + this.keyMap = {} this.list = []; this.getList(); this.getScheduleByMe() @@ -500,6 +504,14 @@ }, methods: { getList(){ + const key = `_${this.currentPage}` + const value = this.keyMap[key] + // 濡傛灉value瀛樺湪锛岃〃绀虹紦瀛樻湁鍊硷紝閭d箞闃绘璇锋眰 + if(value) { + return + } + // value涓嶅瓨鍦紝琛ㄧず绗竴娆¤姹�,璁剧疆鍗犱綅 + this.keyMap[key] = 'temp' if(this.currentPage==1){ this.listLoading = true } -- Gitblit v1.9.3