From 5d3a187a2df12acc5905a1923cf4f24164b72d80 Mon Sep 17 00:00:00 2001 From: "Alex.hxy" <1872591453@qq.com> Date: Fri, 1 Nov 2024 18:01:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(infinite):=20loadingText=E6=9C=AA=E5=B1=85?= =?UTF-8?q?=E4=B8=AD=20(#2683)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(infite): loadingText不居中 * chore: save * chore: save --- src/packages/infiniteloading/demo.taro.tsx | 5 ++++- .../infiniteloading/infiniteloading.taro.tsx | 18 ++++++------------ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/packages/infiniteloading/demo.taro.tsx b/src/packages/infiniteloading/demo.taro.tsx index 8d30c4895f..95f102cad5 100644 --- a/src/packages/infiniteloading/demo.taro.tsx +++ b/src/packages/infiniteloading/demo.taro.tsx @@ -40,7 +40,10 @@ const InfiniteLoadingDemo = () => { return ( <>
- + {translated['84aa6bce']} {translated.eb4236fe} diff --git a/src/packages/infiniteloading/infiniteloading.taro.tsx b/src/packages/infiniteloading/infiniteloading.taro.tsx index 19976be410..13a3547c8a 100644 --- a/src/packages/infiniteloading/infiniteloading.taro.tsx +++ b/src/packages/infiniteloading/infiniteloading.taro.tsx @@ -73,7 +73,7 @@ export const InfiniteLoading: FunctionComponent< const y = useRef(0) const refreshMaxH = useRef(0) const distance = useRef(0) - const classPrefix = 'nut-infinite' + const classes = classNames(classPrefix, className, `${classPrefix}-${type}`) useEffect(() => { @@ -189,20 +189,14 @@ export const InfiniteLoading: FunctionComponent< onTouchMove={touchMove} onTouchEnd={touchEnd} > - - + + {pullingText || locale.infiniteloading.pullRefreshText} - {children} - - - {getBottomTipsText()} - + {children} + + {getBottomTipsText()} )