From e902a74f247d9c930a497d99f39e7cb55c17fe3d Mon Sep 17 00:00:00 2001 From: tony chen Date: Fri, 19 Jan 2024 17:05:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=B8=BF=E8=92=99=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/about/index.scss | 2 ++ src/pages/apis/index.scss | 2 ++ src/pages/apis/pages/surface/scroll/index.tsx | 7 +++---- src/pages/components/index.scss | 2 ++ src/pages/global/index.scss | 2 ++ src/pages/global/pages/styles/size.scss | 2 +- 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/pages/about/index.scss b/src/pages/about/index.scss index 94e1ef9f..92bf4564 100644 --- a/src/pages/about/index.scss +++ b/src/pages/about/index.scss @@ -9,6 +9,8 @@ margin: 0 30px; border-radius: 10px; text-align: center; + display: flex; + flex-direction: column; &-img { height: 180px; width: 180px; diff --git a/src/pages/apis/index.scss b/src/pages/apis/index.scss index 011052a7..f916803c 100644 --- a/src/pages/apis/index.scss +++ b/src/pages/apis/index.scss @@ -23,6 +23,8 @@ .index-desc_text { color: #888888; + width: 100%; + text-align: center; } .navigator-box { diff --git a/src/pages/apis/pages/surface/scroll/index.tsx b/src/pages/apis/pages/surface/scroll/index.tsx index d9997558..9d6caf4e 100644 --- a/src/pages/apis/pages/surface/scroll/index.tsx +++ b/src/pages/apis/pages/surface/scroll/index.tsx @@ -8,11 +8,10 @@ import './index.scss' * @returns */ const Index = () => { - const _pageScrollTo = (top) => () => { - top = Taro.pxTransform(top * 2) - top = top.replace(/[a-z]+$/, '') + const _pageScrollTo = (top: number) => () => { + const _top = Taro.pxTransform(top * 2) Taro.pageScrollTo({ - scrollTop: top, + scrollTop: _top, }) } return ( diff --git a/src/pages/components/index.scss b/src/pages/components/index.scss index cf65ce45..d404e78a 100644 --- a/src/pages/components/index.scss +++ b/src/pages/components/index.scss @@ -24,6 +24,8 @@ .index-desc_text { color: #888888; + width: 100%; + text-align: center; } .navigator-box { diff --git a/src/pages/global/index.scss b/src/pages/global/index.scss index d1ffaabe..e2231748 100644 --- a/src/pages/global/index.scss +++ b/src/pages/global/index.scss @@ -23,6 +23,8 @@ } .index-desc_text { + width: 100%; + text-align: center; color: #888888; } diff --git a/src/pages/global/pages/styles/size.scss b/src/pages/global/pages/styles/size.scss index 533f9f94..b0c03db3 100644 --- a/src/pages/global/pages/styles/size.scss +++ b/src/pages/global/pages/styles/size.scss @@ -24,5 +24,5 @@ .w-60 { height: 100px; width: 60%; - background-color: orange; + background-color: blue; } \ No newline at end of file