Files
short-drama-agent-front/src/components/ui/WorkspaceTools.vue
T
GouJ 7a60db3ced feat: 同步动作与首帧编辑能力并统一工作区反馈
接入动作时间轴、密度审计、人工视线目标和后台首帧编辑;独立读取已保存提示词,并在首帧晋升前重新核对持久化质量状态。
统一 NMessage 结果反馈、局部 loading 和业务说明间距,保留真实长任务进度与部分失败语义。
验证:pnpm check(49 个文件、393 项测试)、pnpm build;当前环境无法完成 localhost 浏览器验收及真实后端联调。
2026-10-12 20:05:03 +08:00

81 lines
2.4 KiB
Vue

<script setup lang="ts">
import { NButton } from 'naive-ui'
import AppDialog from './AppDialog.vue'
import { LoaderCircle, Settings2 } from '@lucide/vue'
/** 批量设置与回执属于临时操作,统一使用大尺寸弹窗;完整制作流程继续保留独立页面。 */
withDefaults(
defineProps<{
title: string
label?: string
hasReceipt?: boolean
triggerless?: boolean
/** 当前工作区存在运行中的请求或持久化任务。 */
pending?: boolean
/** 在操作入口原位置展示真实任务名称。 */
pendingLabel?: string
}>(),
{
label: '操作与回执',
triggerless: false
}
)
const open = defineModel<boolean>('open', { default: false })
</script>
<template>
<NButton
v-if="!triggerless"
class="workspace-tools-trigger"
data-workspace-tools
:aria-label="label"
:title="label"
aria-haspopup="dialog"
:aria-expanded="open"
:aria-busy="!!pending"
@click="open = true"
>
<template #icon
><LoaderCircle v-if="pending" :size="15" class="animate-spin" /><Settings2 v-else :size="15"
/></template>
<span class="workspace-tools-label">{{ pending ? pendingLabel || '任务执行中' : label }}</span
><span v-if="hasReceipt" class="workspace-tools-receipt text-xs text-muted"> · 有回执</span>
</NButton>
<AppDialog v-model:open="open" :title="title" description="" wide>
<div class="workspace-tools-body"><slot /></div>
</AppDialog>
</template>
<style>
/* 本组件专属布局与 Naive 内部结构覆盖。 */
@reference "../../styles/styles.css";
.workspace-tools-body {
@apply px-0 pb-5;
}
.workspace-tools-body > * + * {
@apply mt-5;
}
.workspace-tools-body .panel {
@apply p-5;
}
.workspace-tools-body .overview-content {
@apply pb-0;
}
.workspace-tools-body .storyboard-controls,
.workspace-tools-body .production-controls {
@apply grid grid-cols-[repeat(auto-fit,_minmax(160px,_1fr))] gap-4 my-5;
}
.workspace-tools-body .storyboard-coverage {
@apply my-5;
}
.workspace-tools-body .generation-row {
@apply block;
}
.workspace-tools-body .generation-row > div + div {
@apply mt-3.5;
}
.workspace-tools-body .production-pipeline {
@apply grid-cols-[repeat(auto-fit,_minmax(min(100%,_230px),_1fr))];
}
</style>