From 81be3628d337e9bb9f0e5b15f6b2e3595231f7a0 Mon Sep 17 00:00:00 2001 From: madixin <42690727@qq.com> Date: Fri, 23 Dec 2022 11:16:20 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8DquickStart.ets=E4=BE=8B?= =?UTF-8?q?=E5=AD=90=E6=9C=AA=E8=AE=BE=E7=BD=AEmWidth=EF=BC=8CmHeight?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复方式:mWidth,mHeight未设置时,按照100%设置 Signed-off-by: madixin <42690727@qq.com> --- .../src/main/ets/components/PullToRefresh/PullToRefresh.ets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets b/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets index 2f1e58b..1d09a8a 100644 --- a/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets +++ b/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets @@ -123,8 +123,8 @@ export struct PullToRefresh { .height(-this.trYBottom) .backgroundColor(this.refreshConfigurator.getLoadBackgroundColor()) } - .width(this.mWidth) - .height(this.mHeight) + .width(this.mWidth === undefined ? '100%' : this.mWidth) + .height(this.mHeight === undefined ? '100%' : this.mHeight) .onAreaChange((oldValue: Area, newValue: Area) => { this.mWidthNumber = Math.round(newValue.width as number); this.mHeightNumber = Math.round(newValue.height as number); -- Gitee From b50bddf52a92a574340df571871afbc9c005044f Mon Sep 17 00:00:00 2001 From: madixin <42690727@qq.com> Date: Fri, 23 Dec 2022 11:18:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E9=AD=94=E9=AC=BC?= =?UTF-8?q?=E6=95=B0=E5=AD=97=EF=BC=8C=E4=BD=BF=E7=94=A8Edge=E4=BC=A0?= =?UTF-8?q?=E5=85=A5=EF=BC=8C=E8=AF=AD=E4=B9=89=E6=9B=B4=E6=B8=85=E6=99=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: madixin <42690727@qq.com> --- .../src/main/ets/components/PullToRefresh/PullToRefresh.ets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets b/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets index 1d09a8a..fb95fc8 100644 --- a/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets +++ b/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets @@ -285,10 +285,10 @@ export struct PullToRefresh { if (this.refreshConfigurator.getListIsPlacement()) { if (this.state == IS_PULL_DOWN_1 || this.state == IS_PULL_DOWN_2) { // 让列表归位到顶部 - this.scroller.scrollEdge(0); + this.scroller.scrollEdge(Edge.Top); // 让列表归位到底部 } else if (this.state == IS_PULL_UP_1 || this.state == IS_PULL_UP_2) { - this.scroller.scrollEdge(2); + this.scroller.scrollEdge(Edge.Bottom); } } if (this.trYTop > 0) { // 下拉结束 -- Gitee