feat(annotation): 更新标签工作室文本编辑器界面配置

- 修改标注接口配置,启用当前标注和历史记录功能
- 替换提交按钮为标注标签页和菜单功能
- 优化文件卡片布局样式,调整高度和溢出处理
- 更新编辑器卡片样式,改进响应式布局结构
This commit is contained in:
2026-01-09 18:38:55 +08:00
parent 95c480360c
commit 0f68146283
2 changed files with 27 additions and 6 deletions

View File

@@ -17,6 +17,22 @@
}
</style>
<!--
本地静态资源(推荐生产环境离线/内网部署):
- 当前锁定版本:label-studio-frontend@1.7.1
- 资源来源(示例):
- https://unpkg.com/label-studio-frontend@1.7.1/dist/lsf/css/main.css
- https://unpkg.com/label-studio-frontend@1.7.1/dist/lsf/js/main.js
- 放置目录:frontend/public/lsf/lsf/
- TEXT(DataMate 当前默认只用 TEXT)通常只需要:
- css/main.css
- js/main.js
- 如果后续启用音频/更多功能导致按需加载 404,再补齐 dist/lsf 全量目录;常见额外文件:
- version.json
- js/478.chunk.js(可选:478.chunk.js.map)
- js/decode-audio.wasm
- *.map、main.js.LICENSE.txt(可选)
-->
<link rel="stylesheet" href="./lsf/css/main.css" />
<script src="./lsf/js/main.js"></script>
</head>

View File

@@ -126,12 +126,12 @@ export default function LabelStudioTextEditor() {
interfaces: [
"panel",
"update",
"submit",
"controls",
"side-column",
"annotations:tabs",
"annotations:menu",
"annotations:add-new",
"annotations:delete",
"annotations:current",
"annotations:history",
],
selectedAnnotationIndex: 0,
allowCreateEmptyAnnotation: true,
@@ -291,8 +291,13 @@ export default function LabelStudioTextEditor() {
</div>
</div>
<div className="flex gap-3 flex-1 min-h-0">
<Card title="文件" style={{ width: 320 }} bodyStyle={{ padding: 0, height: "100%", overflow: "auto" }}>
<div className="flex items-stretch gap-3 flex-1 min-h-0">
<Card
title="文件"
className="h-full flex flex-col"
style={{ width: 320 }}
bodyStyle={{ padding: 0, flex: 1, overflow: "auto" }}
>
<List
loading={loadingTasks}
dataSource={tasks}
@@ -325,7 +330,7 @@ export default function LabelStudioTextEditor() {
/>
</Card>
<Card title="编辑器" className="flex-1" bodyStyle={{ padding: 0, height: "100%", overflow: "hidden" }}>
<Card title="编辑器" className="flex-1 h-full flex flex-col" bodyStyle={{ padding: 0, flex: 1, overflow: "hidden" }}>
<div className="relative h-full">
{loadingTaskDetail && (
<div className="absolute inset-0 z-10 flex items-center justify-center bg-white/70">