From ac90ef9206ee574cebbe50a7573b17b006545bc5 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Thu, 14 May 2026 18:06:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20CSS=20Module=20spin=20?= =?UTF-8?q?=E5=8A=A8=E7=94=BB=EF=BC=9A:global(spin)=20=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=20@keyframes=20spin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PostCSS 将 :global(spin) 解析为伪元素 :: 导致 Vercel 构建失败。 改用在每个 CSS Module 中定义本地 @keyframes spin。 --- frontend/components/account/AccountCenter.module.css | 4 +++- frontend/components/dashboard/DashboardMap.module.css | 4 +++- frontend/components/dashboard/DashboardModalGuide.module.css | 4 +++- frontend/components/dashboard/DashboardShell.module.css | 4 +++- frontend/components/dashboard/DetailPanelSections.module.css | 4 +++- frontend/components/dashboard/FutureForecastModal.module.css | 4 +++- frontend/components/dashboard/ScanTerminalCard.module.css | 4 +++- frontend/components/dashboard/ScanTerminalList.module.css | 4 +++- frontend/components/dashboard/ScanTerminalShell.module.css | 4 +++- 9 files changed, 27 insertions(+), 9 deletions(-) diff --git a/frontend/components/account/AccountCenter.module.css b/frontend/components/account/AccountCenter.module.css index 4c1198d6..8cc95d01 100644 --- a/frontend/components/account/AccountCenter.module.css +++ b/frontend/components/account/AccountCenter.module.css @@ -358,7 +358,7 @@ } .spin { - animation: :global(spin) 0.9s linear infinite; + animation: spin 0.9s linear infinite; } @media (max-width: 960px) { @@ -483,3 +483,5 @@ } } + +@keyframes spin { to { transform: rotate(360deg); } } diff --git a/frontend/components/dashboard/DashboardMap.module.css b/frontend/components/dashboard/DashboardMap.module.css index dbc872ac..a2edab6d 100644 --- a/frontend/components/dashboard/DashboardMap.module.css +++ b/frontend/components/dashboard/DashboardMap.module.css @@ -544,7 +544,7 @@ border: 2px solid rgba(34, 211, 238, 0.1); border-top-color: var(--accent-cyan); border-radius: 50%; - animation: :global(spin) 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite; + animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite; box-shadow: 0 0 15px rgba(34, 211, 238, 0.1); } @@ -836,3 +836,5 @@ opacity: 0.6; } } + +@keyframes spin { to { transform: rotate(360deg); } } diff --git a/frontend/components/dashboard/DashboardModalGuide.module.css b/frontend/components/dashboard/DashboardModalGuide.module.css index b56247c6..cf255197 100644 --- a/frontend/components/dashboard/DashboardModalGuide.module.css +++ b/frontend/components/dashboard/DashboardModalGuide.module.css @@ -86,7 +86,7 @@ } .root :global(.future-refresh-btn.spinning svg) { - animation: :global(spin) 1s linear infinite; + animation: spin 1s linear infinite; color: var(--accent-cyan); } @@ -295,3 +295,5 @@ font-size: 11px; color: var(--text-muted); } + +@keyframes spin { to { transform: rotate(360deg); } } diff --git a/frontend/components/dashboard/DashboardShell.module.css b/frontend/components/dashboard/DashboardShell.module.css index fddf7675..2b6f3aa0 100644 --- a/frontend/components/dashboard/DashboardShell.module.css +++ b/frontend/components/dashboard/DashboardShell.module.css @@ -209,7 +209,7 @@ color: var(--accent-cyan); } .root :global(.refresh-btn.spinning) { - animation: :global(spin) 1s linear infinite; + animation: spin 1s linear infinite; } .root :global(.locale-switch) { @@ -817,3 +817,5 @@ flex-direction: column; } } + +@keyframes spin { to { transform: rotate(360deg); } } diff --git a/frontend/components/dashboard/DetailPanelSections.module.css b/frontend/components/dashboard/DetailPanelSections.module.css index 98525be7..2a82d292 100644 --- a/frontend/components/dashboard/DetailPanelSections.module.css +++ b/frontend/components/dashboard/DetailPanelSections.module.css @@ -111,7 +111,7 @@ border-radius: 999px; border: 2px solid rgba(34, 211, 238, 0.22); border-top-color: rgba(34, 211, 238, 0.92); - animation: :global(spin) 0.8s linear infinite; + animation: spin 0.8s linear infinite; } .root :global(.panel-meta) { @@ -1058,3 +1058,5 @@ } } + +@keyframes spin { to { transform: rotate(360deg); } } diff --git a/frontend/components/dashboard/FutureForecastModal.module.css b/frontend/components/dashboard/FutureForecastModal.module.css index 7a96c715..3ba4d053 100644 --- a/frontend/components/dashboard/FutureForecastModal.module.css +++ b/frontend/components/dashboard/FutureForecastModal.module.css @@ -56,7 +56,7 @@ border: 2px solid rgba(34, 211, 238, 0.18); border-top-color: #22d3ee; border-radius: 999px; - animation: :global(spin) 0.8s linear infinite; + animation: spin 0.8s linear infinite; } .root :global(.future-v2-sync-strip) { @@ -1789,3 +1789,5 @@ html.light .root :global(.future-v2-refresh-lock strong) { color: #0f172a; } + +@keyframes spin { to { transform: rotate(360deg); } } diff --git a/frontend/components/dashboard/ScanTerminalCard.module.css b/frontend/components/dashboard/ScanTerminalCard.module.css index b3fdf151..401f2927 100644 --- a/frontend/components/dashboard/ScanTerminalCard.module.css +++ b/frontend/components/dashboard/ScanTerminalCard.module.css @@ -648,7 +648,7 @@ } .root :global(.scan-ai-city-icon-button .spin) { - animation: :global(spin) 1s linear infinite; + animation: spin 1s linear infinite; } .root :global(.scan-ai-city-collapse) { @@ -1289,3 +1289,5 @@ font-weight: 600; color: var(--color-text-muted); } + +@keyframes spin { to { transform: rotate(360deg); } } diff --git a/frontend/components/dashboard/ScanTerminalList.module.css b/frontend/components/dashboard/ScanTerminalList.module.css index 778fb5d5..c2c17dc8 100644 --- a/frontend/components/dashboard/ScanTerminalList.module.css +++ b/frontend/components/dashboard/ScanTerminalList.module.css @@ -95,7 +95,7 @@ } .root :global(.scan-status-chip .spin) { - animation: :global(spin) 1s linear infinite; + animation: spin 1s linear infinite; } .root :global(.scan-table-shell) { @@ -518,3 +518,5 @@ overflow: visible; } + +@keyframes spin { to { transform: rotate(360deg); } } diff --git a/frontend/components/dashboard/ScanTerminalShell.module.css b/frontend/components/dashboard/ScanTerminalShell.module.css index c8531bce..001ad932 100644 --- a/frontend/components/dashboard/ScanTerminalShell.module.css +++ b/frontend/components/dashboard/ScanTerminalShell.module.css @@ -280,5 +280,7 @@ } .root :global(.scan-ghost-button .spin) { - animation: :global(spin) 1s linear infinite; + animation: spin 1s linear infinite; } + +@keyframes spin { to { transform: rotate(360deg); } }