Skip to content

Commit

Permalink
fix(infinite): loadingText未居中 (#2683)
Browse files Browse the repository at this point in the history
* fix(infite): loadingText不居中

* chore: save

* chore: save
  • Loading branch information
Alex-huxiyang authored Nov 1, 2024
1 parent 5393ec6 commit 5d3a187
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
5 changes: 4 additions & 1 deletion src/packages/infiniteloading/demo.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ const InfiniteLoadingDemo = () => {
return (
<>
<Header />
<ScrollView className={`demo ${Taro.getEnv() === 'WEB' ? 'web' : ''}`}>
<ScrollView
className={`demo ${Taro.getEnv() === 'WEB' ? 'web' : ''}`}
showScrollbar={false}
>
<View className="h2">{translated['84aa6bce']}</View>
<Demo1 />
<View className="h2">{translated.eb4236fe}</View>
Expand Down
18 changes: 6 additions & 12 deletions src/packages/infiniteloading/infiniteloading.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down Expand Up @@ -189,20 +189,14 @@ export const InfiniteLoading: FunctionComponent<
onTouchMove={touchMove}
onTouchEnd={touchEnd}
>
<View
className={`${classPrefix}-top`}
ref={refreshTop}
style={getStyle()}
>
<View className={`${classPrefix}-top-tips`}>
<View className="nut-infinite-top" ref={refreshTop} style={getStyle()}>
<View className="nut-infinite-top-tips">
{pullingText || locale.infiniteloading.pullRefreshText}
</View>
</View>
<View className={`${classPrefix}-container`}>{children}</View>
<View className={`${classPrefix}-bottom`}>
<View className={`${classPrefix}-bottom-tips`}>
{getBottomTipsText()}
</View>
<View className="nut-infinite-container">{children}</View>
<View className="nut-infinite-bottom">
<View className="nut-infinite-bottom-tips">{getBottomTipsText()}</View>
</View>
</ScrollView>
)
Expand Down

0 comments on commit 5d3a187

Please sign in to comment.