From c1fb02b0f5f60f33cfe9fd8d115ede54984aa28e Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Sat, 31 Jan 2026 17:19:18 +0800 Subject: [PATCH] =?UTF-8?q?refactor(annotation):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=BC=96=E8=BE=91=E6=A8=A1=E5=BC=8F=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除 AnnotationTask 类型导入 - 添加 AnnotationTaskListItem 类型导入 - 修改 editTask 属性类型从 AnnotationTask 到 AnnotationTaskListItem - 优化组件类型定义以匹配实际使用的数据结构 --- .../Create/components/CreateAnnotationTaskDialog.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/DataAnnotation/Create/components/CreateAnnotationTaskDialog.tsx b/frontend/src/pages/DataAnnotation/Create/components/CreateAnnotationTaskDialog.tsx index 0a1146d..2a3fefd 100644 --- a/frontend/src/pages/DataAnnotation/Create/components/CreateAnnotationTaskDialog.tsx +++ b/frontend/src/pages/DataAnnotation/Create/components/CreateAnnotationTaskDialog.tsx @@ -19,7 +19,8 @@ import { queryAnnotationTemplatesUsingGet, } from "../../annotation.api"; import { DatasetType, type Dataset } from "@/pages/DataManagement/dataset.model"; -import { DataType, type AnnotationTemplate, type AnnotationTask } from "../../annotation.model"; +import { DataType, type AnnotationTemplate } from "../../annotation.model"; +import type { AnnotationTaskListItem } from "../../annotation.const"; import LabelStudioEmbed from "@/components/business/LabelStudioEmbed"; import TemplateConfigurationTreeEditor from "../../components/TemplateConfigurationTreeEditor"; import { useTagConfig } from "@/hooks/useTagConfig"; @@ -29,7 +30,7 @@ interface AnnotationTaskDialogProps { onClose: () => void; onRefresh: () => void; /** 编辑模式:传入要编辑的任务数据 */ - editTask?: AnnotationTask | null; + editTask?: AnnotationTaskListItem | null; } type DatasetOption = Dataset & { icon?: ReactNode };