Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyatong committed Oct 10, 2024
1 parent 9744ce0 commit 98fa2c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
8 changes: 1 addition & 7 deletions src/packages/backtop/backtop.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,7 @@ export const BackTop: FunctionComponent<
}
const classPrefix = 'nut-backtop'
const [backTop, SetBackTop] = useState(false)
const cls = classNames(
classPrefix,
{
show: backTop,
},
className
)
const cls = classNames(classPrefix, { show: backTop }, className)
// 监听用户滑动页面事件
usePageScroll((res) => {
const { scrollTop } = res
Expand Down
8 changes: 1 addition & 7 deletions src/packages/backtop/backtop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,7 @@ export const BackTop: FunctionComponent<
const [scrollTop, SetScrollTop] = useState(0)
let startTime = 0
const scrollEl = useRef<any>(null)
const cls = classNames(
classPrefix,
{
show: backTop,
},
className
)
const cls = classNames(classPrefix, { show: backTop }, className)

const scrollListener = useCallback(() => {
let top = null
Expand Down

0 comments on commit 98fa2c7

Please sign in to comment.