From df5bb6d4f94d94afa352fec8ddea55e3eccaeefd Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 20 May 2025 13:56:32 +0800 Subject: [PATCH] . --- apps/blogai/components/header.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/blogai/components/header.tsx b/apps/blogai/components/header.tsx index 29d2985..9f8d092 100644 --- a/apps/blogai/components/header.tsx +++ b/apps/blogai/components/header.tsx @@ -431,9 +431,10 @@ export function DetailPageHeader({ data }: { data: any }) { console.log("收到进度信息:", msg); setStatusText(msg); - const match = msg.match(/进度[::]?\s*(\d+)%/); - if (match && match[1]) { - setProgress(match[1] + "%"); + const percentMatch = msg.match(/(\d+)%/); + if (percentMatch && percentMatch[1]) { + setProgress(percentMatch[1] + "%"); + } if (match[1] === "100") { console.log("部署完成 ✅,重新拉取状态!");