From d2dc1d20b27920713277fb1967a3c301f0bcb054 Mon Sep 17 00:00:00 2001 From: linju Date: Wed, 2 Aug 2023 20:01:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E4=B8=8B=E6=8B=89=E4=B8=8A=E6=8B=89=E6=95=88=E6=9E=9C?= =?UTF-8?q?=20=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 45 ++++++++++--------- .../custom-pull-page/custom-pull-page.uvue | 40 ++++++++--------- .../custom-pull/custom-pull.uvue | 33 +++++++------- 3 files changed, 61 insertions(+), 57 deletions(-) diff --git a/pages.json b/pages.json index 19a9818c..cddf0264 100644 --- a/pages.json +++ b/pages.json @@ -657,8 +657,8 @@ { "path": "pages/template/scroll-fold-nav/scroll-fold-nav", "style": { - "navigationStyle": "custom", - "navigationBarTextStyle":"black" + "navigationStyle": "custom", + "navigationBarTextStyle": "black" } }, { @@ -689,16 +689,22 @@ { "path": "pages/template/scroll-fold-nav2/scroll-fold-nav2", "style": { - "navigationStyle": "custom" + "navigationStyle": "custom", + "navigationBarTextStyle": "black" + } + }, + { + "path": "pages/template/calendar/calendar", + "style": { + "navigationBarTitleText": "日历", + "enablePullDownRefresh": false + } + }, { + "path": "pages/template/custom-refresher/custom-refresher", + "style": { + "navigationBarTitleText": "自定义下拉刷新(原生实现)", + "enablePullDownRefresh": false } - }, - { - "path" : "pages/template/calendar/calendar", - "style" : - { - "navigationBarTitleText": "日历", - "enablePullDownRefresh": false - } } ], "globalStyle": { @@ -715,8 +721,7 @@ "selectedColor": "#007AFF", "borderStyle": "black", "backgroundColor": "#F8F8F8", - "list": [ - { + "list": [{ "pagePath": "pages/tabBar/component", "iconPath": "static/component.png", "selectedIconPath": "static/componentHL.png", @@ -745,12 +750,10 @@ "condition": { //模式配置,仅开发期间生效 "current": 0, //当前激活的模式(list 的索引项) - "list": [ - { - "name": "", //模式名称 - "path": "", //启动页面,必选 - "query": "" //启动参数,在页面的onLoad函数里面得到 - } - ] + "list": [{ + "name": "", //模式名称 + "path": "", //启动页面,必选 + "query": "" //启动参数,在页面的onLoad函数里面得到 + }] } -} +} \ No newline at end of file diff --git a/pages/template/custom-pull-page/custom-pull-page.uvue b/pages/template/custom-pull-page/custom-pull-page.uvue index e5caf274..a15dbab4 100644 --- a/pages/template/custom-pull-page/custom-pull-page.uvue +++ b/pages/template/custom-pull-page/custom-pull-page.uvue @@ -1,9 +1,8 @@ - item-{{i}} @@ -31,7 +29,7 @@ 继续上拉加载更多(slot) 释放立即加载更多 加载中... - 加载完成 + 加载完成 @@ -53,18 +51,18 @@ return { } }, - onLoad() { - console.log('this.$refs["custom-pull"]', this.$refs["custom-pull"]); + onReady() { + // console.log('this.$refs["custom-pull"]', this.$refs["custom-pull"] as ComponentPublicInstance); }, methods: { loading() { setTimeout(() => { - // this.$refs["custom-pull"].endLoading() //暂不支持,内部模拟实现 + (this.$refs["custom-pull"] as ComponentPublicInstance).$callMethod('endLoading') }, 1000); }, refresh() { setTimeout(() => { - // this.$refs["custom-pull"].endRefresh() //暂不支持,内部模拟实现 + (this.$refs["custom-pull"] as ComponentPublicInstance).$callMethod('endRefresh') }, 1000); } } @@ -75,13 +73,13 @@ .root { flex: 1; background-color: #FFF; - } - .top-box{ - padding: 15px 5px; - } - .top-box-text{ - font-size: 14px; - color: #888; + } + .top-box{ + padding: 15px 5px; + } + .top-box-text{ + font-size: 14px; + color: #888; } .custom-pull { @@ -97,7 +95,7 @@ .logo { width: 30px; - height: 30px; + height: 30px; margin-top: 3px; } diff --git a/pages/template/custom-pull-page/custom-pull/custom-pull.uvue b/pages/template/custom-pull-page/custom-pull/custom-pull.uvue index 5aac964e..5401a353 100644 --- a/pages/template/custom-pull-page/custom-pull/custom-pull.uvue +++ b/pages/template/custom-pull-page/custom-pull/custom-pull.uvue @@ -5,9 +5,9 @@ :style="{'height':height+loadingBoxHeight+refreshBoxHeight+'px',width,'transform':'translateY('+(y-refreshBoxHeight-3)+'px)'}"> - - - + + +