feat(annotation): 添加模板示例数据配置功能

- 在模板配置表单中新增示例数据输入区域
- 实现不同数据类型的示例输入框(文本、图片、音频、视频等)
- 添加图片类型示例的实时预览功能
- 在模板详情页增加示例数据预览卡片
- 支持多种媒体类型的示例展示(图片、音频、视频、文本)
- 更新前后端数据模型以支持exampleData字段
- 添加示例数据的placeholder提示文案
This commit is contained in:
2026-01-18 21:59:41 +08:00
parent 5057457329
commit a2b0fc3674
4 changed files with 177 additions and 2 deletions

View File

@@ -53,6 +53,12 @@ export interface TemplateConfiguration {
labels: LabelDefinition[];
objects: ObjectDefinition[];
metadata?: Record<string, any>;
/**
* 示例数据,用于模板预览
* key: 变量名(不带$前缀,如 "image"、"text")
* value: 示例内容(URL 或文本)
*/
exampleData?: Record<string, string>;
}
export interface AnnotationTemplate {