feat(annotation): 添加标注模板配置功能

- 在schema中新增choice和show_inline字段支持选择模式配置
- 为编辑器服务添加空标注创建逻辑避免前端异常
- 实现标签类型的标准化处理和大小写兼容
- 支持Choices标签的单选/多选和行内显示配置
- 优化前端界面滚动条显示控制样式
This commit is contained in:
2026-01-09 13:05:09 +08:00
parent a82f4f1bc3
commit 08336e2a13
4 changed files with 34 additions and 5 deletions

View File

@@ -14,6 +14,8 @@ class LabelDefinition(BaseModel):
options: Optional[List[str]] = Field(None, description="选项列表(用于choices类型)")
labels: Optional[List[str]] = Field(None, description="标签列表(用于rectanglelabels等类型)")
required: bool = Field(False, description="是否必填")
choice: Optional[str] = Field(None, description="Choices 选择模式: single/multiple")
show_inline: Optional[bool] = Field(None, alias="showInline", description="Choices 是否行内显示")
description: Optional[str] = Field(None, description="标签描述")
model_config = ConfigDict(populate_by_name=True)