react hook页面滚动到某一高度,显示回到顶部按钮
回到顶部组件:
import React, { useEffect, useState } from 'react';
import { ArrowUpOutlined } from '@ant-design/icons';
import PropTypes from 'prop-types';
function ToTop(props) {
const { showPhone } = props;
const [show, switchShow] = useState(false);
原创
2022-03-28 18:22:07 ·
1286 阅读 ·
0 评论