Skip to content

🎬 火宝短剧 - 基于AI的一站式短剧生成平台 《一句话生成完整短剧,从剧本到成片全自动化》 Huobao Drama - An AI-Powered End-to-End Short Drama Generator "One Sentence to Complete Drama: Fully Automated from Script to Final Video"

TypeScript

refactor(preview): 移除剧本文本区,媒体预览占满全高

Connorb8dbb14faae0
diff --git a/web/src/views/drama/professional/PreviewPane.vue b/web/src/views/drama/professional/PreviewPane.vue
index 81b69ba..6965397 100644
--- a/web/src/views/drama/professional/PreviewPane.vue
+++ b/web/src/views/drama/professional/PreviewPane.vue
@@ -1,7 +1,7 @@
<template>
<div class="preview-area-v2">
<template v-if="currentStoryboard">
- <!-- 媒体预览区(上方,限制高度) -->
+ <!-- 媒体预览区(占满全高) -->
<div class="media-section">
<video
v-if="currentPreviewVideo"
@@ -17,40 +17,16 @@
:alt="$t('professionalEditor.currentPreviewAlt')"
/>
<div v-else class="preview-placeholder">
- <el-icon :size="36" color="#444"><Picture /></el-icon>
+ <el-icon :size="36"><Picture /></el-icon>
<p>{{ $t('professionalEditor.noPreview') }}</p>
</div>
- <!-- 镜头信息浮层 -->
+ <!-- 镜头信息浮层(保留) -->
<div class="preview-info-overlay">
<span class="tag-shot-num">#{{ currentStoryboard.storyboard_number }}</span>
<span class="tag-title">{{ currentStoryboard.title || $t('storyboard.untitled') }}</span>
<span class="tag-duration" v-if="currentStoryboard.duration">{{ currentStoryboard.duration }}s</span>
</div>
</div>
-
- <!-- 剧本内容区(下方,可滚动) -->
- <div class="script-section">
- <div class="script-block" v-if="currentStoryboard.action">
- <div class="script-label">{{ $t('editor.action') }}</div>
- <p class="script-text">{{ currentStoryboard.action }}</p>
- </div>
- <div class="script-block" v-if="currentStoryboard.dialogue">
- <div class="script-label">{{ $t('editor.dialogue') }}</div>
- <p class="script-text dialogue">{{ currentStoryboard.dialogue }}</p>
- </div>
- <div class="script-block" v-if="currentStoryboard.result">
- <div class="script-label">{{ $t('editor.result') }}</div>
- <p class="script-text muted">{{ currentStoryboard.result }}</p>
- </div>
- <div class="script-block" v-if="currentStoryboard.description">
- <div class="script-label">{{ $t('editor.description') }}</div>
- <p class="script-text muted">{{ currentStoryboard.description }}</p>
- </div>
- <div class="script-empty" v-if="!currentStoryboard.action && !currentStoryboard.dialogue && !currentStoryboard.result && !currentStoryboard.description">
- <el-icon :size="20" color="#555"><Document /></el-icon>
- <p>{{ $t('professionalEditor.noScriptContent') }}</p>
- </div>
- </div>
</template>
<div v-else class="preview-placeholder full">
@@ -61,7 +37,7 @@
</template>
<script setup lang="ts">
-import { Picture, Document } from '@element-plus/icons-vue'
+import { Picture } from '@element-plus/icons-vue'
import type { Storyboard } from '@/types/drama'
defineProps<{
@@ -74,6 +50,7 @@ defineProps<{
<style scoped lang="scss">
.preview-area-v2 {
flex: 1;
+ min-width: 300px;
min-height: 80px;
background: var(--bg-primary, #f5f7fa);
display: flex;
@@ -85,8 +62,7 @@ defineProps<{
.media-section {
position: relative;
background: #000;
- flex-shrink: 0;
- height: 45%;
+ flex: 1;
min-height: 120px;
display: flex;
align-items: center;
@@ -149,63 +125,4 @@ defineProps<{
border-radius: 4px;
}
-/* 剧本内容区 */
-.script-section {
- flex: 1;
- overflow-y: auto;
- padding: 12px 14px;
- display: flex;
- flex-direction: column;
- gap: 10px;
-
- &::-webkit-scrollbar { width: 4px; }
- &::-webkit-scrollbar-thumb {
- background: var(--border-primary, #e4e7ed);
- border-radius: 2px;
- }
-}
-
-.script-block {
- display: flex;
- flex-direction: column;
- gap: 4px;
-}
-
-.script-label {
- font-size: 10px;
- font-weight: 600;
- color: var(--text-muted, #9ca3af);
- text-transform: uppercase;
- letter-spacing: 0.05em;
-}
-
-.script-text {
- font-size: 13px;
- line-height: 1.6;
- color: var(--text-primary, #111827);
- margin: 0;
- white-space: pre-wrap;
- word-break: break-word;
-
- &.dialogue {
- color: var(--accent, #e8a243);
- font-style: italic;
- }
-
- &.muted {
- color: var(--text-secondary, #6b7280);
- font-size: 12px;
- }
-}
-
-.script-empty {
- flex: 1;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- gap: 8px;
- color: var(--text-muted, #9ca3af);
- p { font-size: 12px; margin: 0; }
-}
</style>