index.tsx 587 B

1234567891011121314151617181920212223242526
  1. import { Result } from "antd";
  2. import { useEffect, useRef } from "react";
  3. export default function NotFound() {
  4. const timeRef = useRef(-1);
  5. useEffect(() => {
  6. timeRef.current = window.setTimeout(() => {
  7. const dom: any = document.querySelector(".noFindPage");
  8. dom.style.opacity = 1;
  9. }, 200);
  10. return () => {
  11. clearTimeout(timeRef.current);
  12. };
  13. }, []);
  14. return (
  15. <div className="noFindPage">
  16. <Result
  17. status="404"
  18. title="404"
  19. subTitle="页面找不到或没有权限,请联系管理员!"
  20. />
  21. </div>
  22. );
  23. }