From 3b8419f7a75ef9eb74ef3fd994cacaa1ec4e6ce6 Mon Sep 17 00:00:00 2001 From: WenC <450292408@qq.com> Date: Mon, 25 Mar 2024 19:25:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=8E=A5=E5=8F=A3=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/card/CardProjLoading.tsx | 17 ++- src/components/card/CardProjResult.tsx | 10 +- src/interfaces/card/ICardProj.ts | 3 + src/route/proj/ProjEdit.tsx | 145 +++++++++++++++------ src/route/proj/edit/ProjConfigMenuList.tsx | 47 ++++--- src/route/proj/edit/ProjConfigModList.tsx | 2 +- src/route/proj/edit/ProjEditStep5.tsx | 2 +- 7 files changed, 162 insertions(+), 64 deletions(-) diff --git a/src/components/card/CardProjLoading.tsx b/src/components/card/CardProjLoading.tsx index 9b03f92..0f3e47e 100644 --- a/src/components/card/CardProjLoading.tsx +++ b/src/components/card/CardProjLoading.tsx @@ -1,15 +1,28 @@ import './card-proj-loading.css'; import {Loading3QuartersOutlined} from '@ant-design/icons'; import {IProjLoading} from "../../interfaces/card/ICardProj.ts"; +import {useState} from "react"; + +export default function CardProjLoading(props: IProjLoading) { + + const [duration, setDuration] = useState(props.duration); + + const interval = setInterval(() => { + if (duration <= 0) { + clearInterval(interval); + props.handleCountDownOver(); + return; + } + setDuration(duration - 1000); + }, 1000); -export default function CardProjLoading(props:IProjLoading) { return (