From b749b1c621e54c89fb96fc80836763d835a4641c Mon Sep 17 00:00:00 2001 From: shangfangjian Date: Tue, 22 Sep 2026 10:09:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=89=8D=E7=AB=AF=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20+=20P3-1=20=E5=AD=90=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E6=A0=A1=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - tsconfig 排除 *.test.ts(生产构建不编译测试) - OutcomePanel TeamSideTag 导入路径 ../../ → ../../../ - AgentsPanel/OutcomePanel/ReasoningPanel types 导入 ../../ → ../ - MatchPredictPanel JSDoc 注释 **. → /** (P3-1 编辑损坏) 前端构建成功,容器 healthy。 --- frontend/src/pages/matches/components/AgentsPanel.tsx | 4 ++-- frontend/src/pages/matches/components/MatchPredictPanel.tsx | 2 +- frontend/src/pages/matches/components/OutcomePanel.tsx | 6 +++--- frontend/src/pages/matches/components/ReasoningPanel.tsx | 2 +- frontend/tsconfig.json | 3 ++- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/frontend/src/pages/matches/components/AgentsPanel.tsx b/frontend/src/pages/matches/components/AgentsPanel.tsx index 2b70361..689864f 100644 --- a/frontend/src/pages/matches/components/AgentsPanel.tsx +++ b/frontend/src/pages/matches/components/AgentsPanel.tsx @@ -4,8 +4,8 @@ * P3-1: 从 MatchPredictPanel.PredictionPanel 拆出,渲染逻辑原样搬迁。 */ import { useState } from 'react' -import type { AgentReport, Prediction } from '../../types' -import { AGENT_LABELS, CN_NUM } from '../../types' +import type { AgentReport, Prediction } from '../types' +import { AGENT_LABELS, CN_NUM } from '../types' const STATUS_BADGE: Record = { ok: { label: '正常', cls: 'text-ink-500' }, diff --git a/frontend/src/pages/matches/components/MatchPredictPanel.tsx b/frontend/src/pages/matches/components/MatchPredictPanel.tsx index 88cbce1..5fa9460 100644 --- a/frontend/src/pages/matches/components/MatchPredictPanel.tsx +++ b/frontend/src/pages/matches/components/MatchPredictPanel.tsx @@ -27,7 +27,7 @@ function Spinner({ className = '' }: { className?: string }) { } /** 胜平负一行文字:选中的红字加方块标记,未选中的退灰 */ -.** +/** * P3-1:PredictionPanel 不再自绘,改为组合三个子组件: * OutcomePanel(比分/胜平负/成本) / AgentsPanel(专家意见) / ReasoningPanel(终裁/降级)。 * 渲染输出与拆分前完全一致(仅降级警示 + 报头 + 元信息仍在此处)。 diff --git a/frontend/src/pages/matches/components/OutcomePanel.tsx b/frontend/src/pages/matches/components/OutcomePanel.tsx index 0eb8dde..a79e61c 100644 --- a/frontend/src/pages/matches/components/OutcomePanel.tsx +++ b/frontend/src/pages/matches/components/OutcomePanel.tsx @@ -3,9 +3,9 @@ * * P3-1: 从 MatchPredictPanel.PredictionPanel 拆出,渲染逻辑原样搬迁。 */ -import TeamSideTag from '../../../../components/TeamSideTag' -import type { Match, Prediction } from '../../types' -import { OUTCOME_LABEL } from '../../types' +import TeamSideTag from '../../../components/TeamSideTag' +import type { Match, Prediction } from '../types' +import { OUTCOME_LABEL } from '../types' /** 置信度细线:0~1 数值的低调可视化 */ function Meter({ value }: { value: number }) { diff --git a/frontend/src/pages/matches/components/ReasoningPanel.tsx b/frontend/src/pages/matches/components/ReasoningPanel.tsx index 07d1b61..2bed641 100644 --- a/frontend/src/pages/matches/components/ReasoningPanel.tsx +++ b/frontend/src/pages/matches/components/ReasoningPanel.tsx @@ -3,7 +3,7 @@ * * P3-1: 从 MatchPredictPanel.PredictionPanel 拆出,渲染逻辑原样搬迁。 */ -import type { Prediction } from '../../types' +import type { Prediction } from '../types' export function ReasoningPanel({ prediction }: { prediction: Prediction }) { const degraded = prediction.status === 'degraded' || prediction.status === 'failed' diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index 6bfa73a..34f6e57 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -16,5 +16,6 @@ "noUnusedParameters": false, "noFallthroughCasesInSwitch": true }, - "include": ["src"] + "include": ["src"], + "exclude": ["src/**/*.test.ts", "src/**/*.spec.ts", "node_modules"] }