feat(short-drama-agent-front): 新增剧本骨架屏并优化阅读导出

This commit is contained in:
GJ committed 2026-10-10 23:12:59 +08:00
1 parent 54a381ebd3
commit 3cc65aa056
16 files changed
+792 -167

No files matched your search

+20 -6
View File
@@ -14,6 +14,8 @@ import { productionMessage } from '../production/production-messages'
import ProjectSettingsDialog from '../generation-config/components/ProjectSettingsDialog.vue'
import { projectGenerationRevisionKey } from '../generation-config/context'
import WorkflowExecutionPanel from '../workflows/WorkflowExecutionPanel.vue'
import CreateDramaSkeleton from '../create-drama/CreateDramaSkeleton.vue'
import BreakdownSkeleton from '../breakdown/BreakdownSkeleton.vue'
/** 项目标题只保留名称;下游工作区在剧本完成前不挂载,直接链接也无法越过限制。 */
const route = useRoute()
@@ -101,6 +103,14 @@ const currentAccess = computed(() => {
return section ? stageAccess.sections.value[section] : null
})
const isCreation = computed(() => currentSection.value === 'create-drama')
/** 剧本首次读取或切换项目时显示骨架;刷新已有项目时保留正文与阅读位置。 */
const isCreationInitialLoading = computed(
() => isCreation.value && context.loading.value && context.project.value?.id !== id.value
)
/** 拆解页只在首次读取或切换项目时占位,刷新已有结果时保留内容与分类。 */
const isBreakdownInitialLoading = computed(
() => currentSection.value === 'breakdown' && context.loading.value && context.project.value?.id !== id.value
)
type OperationGuide = {
title: string
description: string
@@ -220,13 +230,13 @@ onScopeDispose(() => {
<template>
<section class="project-frame">
<header class="project-header">
<!-- 以下是项目标题与全局配置入口模块 -->
<!-- 以下是项目标题与全局配置入口模块,读取完成前标题留空 -->
<NPageHeader @back="router.push('/projects')">
<template #title
><NEllipsis class="project-title" :tooltip="false">{{
context.project.value?.title || context.project.value?.topic || '读取项目'
}}</NEllipsis></template
>
<template #title>
<NEllipsis class="project-title" :tooltip="false">{{
context.project.value?.title || context.project.value?.topic || ''
}}</NEllipsis>
</template>
<template #extra>
<NButton size="small" :disabled="!context.project.value" @click="settingsOpen = true"
>项目配置</NButton
@@ -300,6 +310,10 @@ onScopeDispose(() => {
>刷新项目状态</NButton
>
</EmptyState>
<!-- 以下是剧本创作首次读取的骨架屏模块 -->
<CreateDramaSkeleton v-else-if="isCreationInitialLoading" />
<!-- 以下是剧本拆解首次读取的骨架屏模块 -->
<BreakdownSkeleton v-else-if="isBreakdownInitialLoading" />
<NSpin v-else-if="context.loading.value" class="workspace-loading" description="正在读取项目内容…" />
</div>
</section>