import clsx from "clsx"; import React from "react"; import styles from "./index.module.scss"; interface LoadingProps { className?: string; // 可选的 className 属性,用于传递额外的样式类名 color?: string; width?: number; space?: number; point?: number; animationDuration?: number; } const Loading: React.FC = ({ className, color, width = 5, point = 4, space = 2, animationDuration = 800, }) => { const Point = ({ idx }: { idx: number }) => { return ( ); }; const pointTime = React.useMemo(() => { return animationDuration / 2 / point; }, [point, animationDuration]); const PointList = React.useCallback(() => { return Array.from({ length: point }, (_, index) => ); }, [point]); return (
); }; export default Loading;