From 233edb64948f4959d2610a9c17728c9306ca9bf0 Mon Sep 17 00:00:00 2001 From: hdx Date: Mon, 4 Sep 2023 17:35:16 +0800 Subject: [PATCH] =?UTF-8?q?long-list-page:=20=E8=B0=83=E6=95=B4=E5=81=9C?= =?UTF-8?q?=E6=AD=A2=E4=B8=8B=E6=8B=89=E5=88=B7=E6=96=B0=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/template/long-list/long-list-page.uvue | 29 +++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/pages/template/long-list/long-list-page.uvue b/pages/template/long-list/long-list-page.uvue index 25226c64..2a752576 100644 --- a/pages/template/long-list/long-list-page.uvue +++ b/pages/template/long-list/long-list-page.uvue @@ -14,7 +14,7 @@ {{item.plugin_intro}} - {{convertToStarUnicode(item.score)}} + {{convertToStarUnicode(item.score)}} {{item2}} @@ -87,6 +87,7 @@ }, }, created() { + // TODO 后续通过css加载本地路径 uni.loadFontFace({ global: false, family: 'UtsIconsFontFamily', @@ -94,16 +95,19 @@ }) if (this.preload) { - this.loadData() + this.loadData(null) } }, methods: { refreshData() { this.dataList.length = 0 this.$currentPage = 1 - this.loadData() + this.loadData(() => { + // TODO + uni.stopPullDownRefresh() + }) }, - loadData() { + loadData(oncomplete : (() => void) | null) { if (this.loading || this.isEnded) { return } @@ -135,8 +139,9 @@ }, complete: () => { this.loading = false - // TODO - uni.stopPullDownRefresh() + if (oncomplete != null) { + oncomplete() + } } }) }, @@ -162,6 +167,13 @@ \ No newline at end of file + -- GitLab