feat(short-drama-agent-front): 新增视觉风格骨架屏并优化参考图添加

This commit is contained in:
GJ committed 2026-10-11 00:01:24 +08:00
1 parent 3cc65aa056
commit 519b956808
11 files changed
+621 -242

No files matched your search

+7 -10
View File
@@ -16,6 +16,7 @@ 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'
import VisualStyleSkeleton from '../visual-style/VisualStyleSkeleton.vue'
/** 项目标题只保留名称;下游工作区在剧本完成前不挂载,直接链接也无法越过限制。 */
const route = useRoute()
@@ -103,14 +104,8 @@ 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
)
/** 各工作区共用首次读取判定;切换项目显示占位,刷新已有项目保留内容。 */
const isProjectInitialLoading = computed(() => context.loading.value && context.project.value?.id !== id.value)
type OperationGuide = {
title: string
description: string
@@ -311,9 +306,11 @@ onScopeDispose(() => {
>
</EmptyState>
<!-- 以下是剧本创作首次读取的骨架屏模块 -->
<CreateDramaSkeleton v-else-if="isCreationInitialLoading" />
<CreateDramaSkeleton v-else-if="isProjectInitialLoading && isCreation" />
<!-- 以下是剧本拆解首次读取的骨架屏模块 -->
<BreakdownSkeleton v-else-if="isBreakdownInitialLoading" />
<BreakdownSkeleton v-else-if="isProjectInitialLoading && currentSection === 'breakdown'" />
<!-- 以下是视觉风格项目首次读取的骨架屏模块 -->
<VisualStyleSkeleton v-else-if="isProjectInitialLoading && currentSection === 'visual-style'" />
<NSpin v-else-if="context.loading.value" class="workspace-loading" description="正在读取项目内容…" />
</div>
</section>