refactor(annotation): 更新任务编辑模式的数据类型定义

- 移除 AnnotationTask 类型导入
- 添加 AnnotationTaskListItem 类型导入
- 修改 editTask 属性类型从 AnnotationTask 到 AnnotationTaskListItem
- 优化组件类型定义以匹配实际使用的数据结构
This commit is contained in:
2026-01-31 17:19:18 +08:00
parent 4a3e466210
commit c1fb02b0f5

View File

@@ -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 };