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

feat: build StoryboardEditor with strip, preview, and properties panel

Connor1785062ec89e
diff --git a/web/src/views/drama/episode/workbench/PreviewPane.vue b/web/src/views/drama/episode/workbench/PreviewPane.vue
new file mode 100644
index 0000000..2b090c8
--- /dev/null
+++ b/web/src/views/drama/episode/workbench/PreviewPane.vue
@@ -0,0 +1,258 @@
+<script setup lang="ts">
+import { ref, computed, watch } from 'vue'
+import { ImageIcon, Play } from 'lucide-vue-next'
+import type { Storyboard } from '@/types/drama'
+import type { ImageGeneration } from '@/types/image'
+import { getImageUrl, getVideoUrl } from '@/utils/image'
+
+const props = defineProps<{
+ storyboard: Storyboard | null
+ images: ImageGeneration[]
+ videoUrl: string | null
+}>()
+
+// Track which gallery image is selected; null = use storyboard's main image
+const selectedImageId = ref<number | null>(null)
+const showVideo = ref(false)
+
+// Reset selection when storyboard changes
+watch(() => props.storyboard?.id, () => {
+ selectedImageId.value = null
+ showVideo.value = false
+})
+
+const mainImageUrl = computed(() => {
+ if (selectedImageId.value !== null) {
+ const img = props.images.find(i => i.id === selectedImageId.value)
+ if (img) return getImageUrl(img)
+ }
+ return getImageUrl(props.storyboard)
+})
+
+function selectImage(img: ImageGeneration) {
+ selectedImageId.value = img.id
+ showVideo.value = false
+}
+
+function toggleVideo() {
+ if (props.videoUrl) {
+ showVideo.value = true
+ selectedImageId.value = null
+ }
+}
+</script>
+
+<template>
+ <div class="preview-root">
+ <template v-if="storyboard">
+ <!-- Main media area -->
+ <div class="preview-main">
+ <video
+ v-if="showVideo && videoUrl"
+ :src="videoUrl"
+ class="preview-media"
+ controls
+ autoplay
+ />
+ <img
+ v-else-if="mainImageUrl"
+ :src="mainImageUrl"
+ class="preview-media"
+ :alt="storyboard.title || '预览'"
+ />
+ <div v-else class="preview-empty">
+ <ImageIcon :size="36" class="preview-empty__icon" />
+ <p class="preview-empty__text">暂无图片,请先生成</p>
+ </div>
+
+ <!-- Info overlay -->
+ <div v-if="mainImageUrl || (showVideo && videoUrl)" class="preview-overlay">
+ <span class="overlay-tag">#{{ storyboard.storyboard_number }}</span>
+ <span v-if="storyboard.title" class="overlay-title">{{ storyboard.title }}</span>
+ <span v-if="storyboard.duration" class="overlay-duration">{{ storyboard.duration }}s</span>
+ </div>
+ </div>
+
+ <!-- Gallery row -->
+ <div class="gallery-row" v-if="images.length > 0 || videoUrl">
+ <!-- Image thumbnails -->
+ <div
+ v-for="img in images"
+ :key="img.id"
+ class="gallery-thumb"
+ :class="{ 'gallery-thumb--active': !showVideo && selectedImageId === img.id }"
+ @click="selectImage(img)"
+ >
+ <img v-if="getImageUrl(img)" :src="getImageUrl(img)" class="gallery-thumb__img" />
+ <div v-else class="gallery-thumb__placeholder">
+ <ImageIcon :size="10" />
+ </div>
+ </div>
+
+ <!-- Video thumbnail -->
+ <div
+ v-if="videoUrl"
+ class="gallery-thumb gallery-thumb--video"
+ :class="{ 'gallery-thumb--active': showVideo }"
+ @click="toggleVideo"
+ >
+ <Play :size="14" class="gallery-thumb__play" />
+ </div>
+ </div>
+ </template>
+
+ <!-- No storyboard selected -->
+ <div v-else class="preview-empty preview-empty--full">
+ <ImageIcon :size="48" class="preview-empty__icon" />
+ <p class="preview-empty__text">选择分镜以预览</p>
+ </div>
+ </div>
+</template>
+
+<style scoped>
+.preview-root {
+ flex: 1;
+ min-width: 0;
+ display: flex;
+ flex-direction: column;
+ background: #0a0a0a;
+ overflow: hidden;
+}
+
+/* Main media */
+.preview-main {
+ flex: 1;
+ min-height: 0;
+ position: relative;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ overflow: hidden;
+}
+
+.preview-media {
+ max-width: 100%;
+ max-height: 100%;
+ object-fit: contain;
+ display: block;
+}
+
+.preview-empty {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ gap: 8px;
+ color: var(--text-muted, rgba(255, 255, 255, 0.3));
+}
+
+.preview-empty--full {
+ flex: 1;
+}
+
+.preview-empty__icon {
+ opacity: 0.5;
+}
+
+.preview-empty__text {
+ font-size: 12px;
+ margin: 0;
+}
+
+/* Overlay */
+.preview-overlay {
+ position: absolute;
+ bottom: 6px;
+ left: 6px;
+ display: flex;
+ gap: 5px;
+ align-items: center;
+}
+
+.overlay-tag {
+ background: rgba(0, 0, 0, 0.75);
+ color: #fff;
+ font-size: 11px;
+ padding: 2px 6px;
+ border-radius: 4px;
+ font-weight: 600;
+}
+
+.overlay-title {
+ color: rgba(255, 255, 255, 0.85);
+ font-size: 11px;
+ text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
+}
+
+.overlay-duration {
+ background: rgba(64, 158, 255, 0.8);
+ color: #fff;
+ font-size: 11px;
+ padding: 2px 6px;
+ border-radius: 4px;
+}
+
+/* Gallery row */
+.gallery-row {
+ flex-shrink: 0;
+ display: flex;
+ align-items: center;
+ gap: 4px;
+ padding: 6px 8px;
+ overflow-x: auto;
+ border-top: 1px solid var(--border-primary, rgba(255, 255, 255, 0.06));
+ background: var(--bg-secondary, rgba(0, 0, 0, 0.15));
+}
+
+.gallery-row::-webkit-scrollbar {
+ height: 3px;
+}
+
+.gallery-row::-webkit-scrollbar-thumb {
+ background: rgba(255, 255, 255, 0.1);
+ border-radius: 2px;
+}
+
+.gallery-thumb {
+ flex-shrink: 0;
+ width: 72px;
+ height: 46px;
+ border-radius: 5px;
+ overflow: hidden;
+ cursor: pointer;
+ border: 1.5px solid transparent;
+ background: #111;
+ transition: border-color 0.1s;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.gallery-thumb:hover {
+ border-color: rgba(255, 255, 255, 0.2);
+}
+
+.gallery-thumb--active {
+ border-color: var(--accent, #e8a243);
+ box-shadow: 0 0 0 1px var(--accent, #e8a243);
+}
+
+.gallery-thumb__img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ display: block;
+}
+
+.gallery-thumb__placeholder {
+ color: var(--text-muted, rgba(255, 255, 255, 0.25));
+}
+
+.gallery-thumb--video {
+ background: rgba(96, 165, 250, 0.1);
+}
+
+.gallery-thumb__play {
+ color: rgba(96, 165, 250, 0.8);
+}
+</style>
diff --git a/web/src/views/drama/episode/workbench/PropertiesPanel.vue b/web/src/views/drama/episode/workbench/PropertiesPanel.vue
new file mode 100644
index 0000000..cd10216
--- /dev/null
+++ b/web/src/views/drama/episode/workbench/PropertiesPanel.vue
@@ -0,0 +1,415 @@
+<script setup lang="ts">
+import { computed } from 'vue'
+import { Button } from '@/components/ui/button'
+import { Badge } from '@/components/ui/badge'
+import { ScrollArea } from '@/components/ui/scroll-area'
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from '@/components/ui/select'
+import {
+ ImageIcon,
+ Video,
+ MapPin,
+ Users,
+ Camera,
+ RotateCcw,
+ Move,
+} from 'lucide-vue-next'
+import type { Storyboard, Character, Scene } from '@/types/drama'
+
+const props = defineProps<{
+ storyboard: Storyboard | null
+ characters: Character[]
+ scenes: Scene[]
+}>()
+
+const emit = defineEmits<{
+ saveField: [field: string, value: any]
+ generateImage: []
+ generateVideo: []
+ showCharacterSelector: []
+ showSceneSelector: []
+}>()
+
+const shotTypeOptions = ['远景', '全景', '中景', '近景', '特写']
+const angleOptions = ['平视', '仰视', '俯视', '侧面']
+const movementOptions = ['固定镜头', '推镜', '拉镜', '跟镜']
+
+const sceneDisplay = computed(() => {
+ if (!props.storyboard?.scene) return null
+ const s = props.storyboard.scene
+ return `${s.location || ''}${s.time ? ' · ' + s.time : ''}`
+})
+
+const storyboardCharacters = computed(() => {
+ if (!props.storyboard?.character_ids?.length) return []
+ return props.characters.filter(c =>
+ props.storyboard!.character_ids!.includes(c.id)
+ )
+})
+
+function onFieldChange(field: string, event: Event) {
+ const target = event.target as HTMLTextAreaElement | HTMLInputElement
+ emit('saveField', field, target.value)
+}
+
+function onSelectChange(field: string, value: string) {
+ emit('saveField', field, value)
+}
+</script>
+
+<template>
+ <div class="props-root">
+ <ScrollArea v-if="storyboard" class="props-scroll">
+ <div class="props-content">
+ <!-- Scene -->
+ <div class="props-section">
+ <div class="props-label">
+ <MapPin :size="12" />
+ 场景
+ </div>
+ <div
+ class="props-scene-display"
+ @click="emit('showSceneSelector')"
+ >
+ <span v-if="sceneDisplay" class="scene-text">{{ sceneDisplay }}</span>
+ <span v-else class="scene-placeholder">选择场景...</span>
+ </div>
+ </div>
+
+ <!-- Characters -->
+ <div class="props-section">
+ <div class="props-label">
+ <Users :size="12" />
+ 角色
+ </div>
+ <div class="props-characters" @click="emit('showCharacterSelector')">
+ <Badge
+ v-for="char in storyboardCharacters"
+ :key="char.id"
+ class="char-badge"
+ >
+ {{ char.name }}
+ </Badge>
+ <span v-if="!storyboardCharacters.length" class="scene-placeholder">
+ 点击添加角色...
+ </span>
+ </div>
+ </div>
+
+ <!-- Shot parameters -->
+ <div class="props-section">
+ <div class="props-label">
+ <Camera :size="12" />
+ 镜头
+ </div>
+ <div class="props-row">
+ <Select
+ :model-value="storyboard.shot_type || ''"
+ @update:model-value="(v: string) => onSelectChange('shot_type', v)"
+ >
+ <SelectTrigger class="props-select-trigger">
+ <SelectValue placeholder="景别" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem v-for="opt in shotTypeOptions" :key="opt" :value="opt">
+ {{ opt }}
+ </SelectItem>
+ </SelectContent>
+ </Select>
+ </div>
+ <div class="props-row">
+ <Select
+ :model-value="storyboard.angle || ''"
+ @update:model-value="(v: string) => onSelectChange('angle', v)"
+ >
+ <SelectTrigger class="props-select-trigger">
+ <SelectValue placeholder="角度" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem v-for="opt in angleOptions" :key="opt" :value="opt">
+ {{ opt }}
+ </SelectItem>
+ </SelectContent>
+ </Select>
+ </div>
+ <div class="props-row">
+ <Select
+ :model-value="storyboard.movement || ''"
+ @update:model-value="(v: string) => onSelectChange('movement', v)"
+ >
+ <SelectTrigger class="props-select-trigger">
+ <SelectValue placeholder="运镜" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem v-for="opt in movementOptions" :key="opt" :value="opt">
+ {{ opt }}
+ </SelectItem>
+ </SelectContent>
+ </Select>
+ </div>
+ </div>
+
+ <!-- Description -->
+ <div class="props-section">
+ <div class="props-label">描述</div>
+ <textarea
+ class="props-textarea"
+ :value="storyboard.description || ''"
+ placeholder="镜头描述..."
+ rows="2"
+ @change="onFieldChange('description', $event)"
+ />
+ </div>
+
+ <!-- Dialogue -->
+ <div class="props-section">
+ <div class="props-label">台词</div>
+ <textarea
+ class="props-textarea"
+ :value="storyboard.dialogue || ''"
+ placeholder="角色台词..."
+ rows="2"
+ @change="onFieldChange('dialogue', $event)"
+ />
+ </div>
+
+ <!-- Action -->
+ <div class="props-section">
+ <div class="props-label">动作</div>
+ <textarea
+ class="props-textarea"
+ :value="storyboard.action || ''"
+ placeholder="角色动作..."
+ rows="2"
+ @change="onFieldChange('action', $event)"
+ />
+ </div>
+
+ <!-- Image Prompt -->
+ <div class="props-section">
+ <div class="props-label">
+ <ImageIcon :size="12" />
+ 图片 Prompt
+ </div>
+ <textarea
+ class="props-textarea props-textarea--tall"
+ :value="storyboard.image_prompt || ''"
+ placeholder="图片生成提示词..."
+ rows="3"
+ @change="onFieldChange('image_prompt', $event)"
+ />
+ </div>
+
+ <!-- Video Prompt -->
+ <div class="props-section">
+ <div class="props-label">
+ <Video :size="12" />
+ 视频 Prompt
+ </div>
+ <textarea
+ class="props-textarea props-textarea--tall"
+ :value="storyboard.video_prompt || ''"
+ placeholder="视频生成提示词..."
+ rows="3"
+ @change="onFieldChange('video_prompt', $event)"
+ />
+ </div>
+
+ <!-- Generate buttons -->
+ <div class="props-actions">
+ <Button
+ variant="outline"
+ size="sm"
+ class="props-gen-btn"
+ @click="emit('generateImage')"
+ >
+ <ImageIcon :size="14" />
+ 生成图片
+ </Button>
+ <Button
+ variant="outline"
+ size="sm"
+ class="props-gen-btn"
+ @click="emit('generateVideo')"
+ >
+ <Video :size="14" />
+ 生成视频
+ </Button>
+ </div>
+ </div>
+ </ScrollArea>
+
+ <!-- Empty state -->
+ <div v-else class="props-empty">
+ <p>选择分镜以编辑属性</p>
+ </div>
+ </div>
+</template>
+
+<style scoped>
+.props-root {
+ width: 260px;
+ flex-shrink: 0;
+ border-left: 1px solid var(--border-primary, rgba(255, 255, 255, 0.06));
+ background: var(--bg-secondary, rgba(0, 0, 0, 0.15));
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+}
+
+.props-scroll {
+ flex: 1;
+ min-height: 0;
+}
+
+.props-content {
+ padding: 10px 12px;
+ display: flex;
+ flex-direction: column;
+ gap: 12px;
+}
+
+.props-section {
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
+}
+
+.props-label {
+ font-size: 11px;
+ font-weight: 600;
+ color: var(--text-secondary, rgba(255, 255, 255, 0.55));
+ display: flex;
+ align-items: center;
+ gap: 4px;
+ text-transform: uppercase;
+ letter-spacing: 0.3px;
+}
+
+.props-row {
+ margin-top: 2px;
+}
+
+.props-select-trigger {
+ height: 28px !important;
+ font-size: 12px !important;
+ background: var(--bg-primary, rgba(0, 0, 0, 0.2)) !important;
+ border-color: var(--border-primary, rgba(255, 255, 255, 0.08)) !important;
+}
+
+/* Scene display */
+.props-scene-display {
+ padding: 5px 8px;
+ border-radius: 6px;
+ background: var(--bg-primary, rgba(0, 0, 0, 0.2));
+ border: 1px solid var(--border-primary, rgba(255, 255, 255, 0.08));
+ cursor: pointer;
+ font-size: 12px;
+ transition: border-color 0.15s;
+}
+
+.props-scene-display:hover {
+ border-color: rgba(255, 255, 255, 0.18);
+}
+
+.scene-text {
+ color: var(--text-primary, rgba(255, 255, 255, 0.9));
+}
+
+.scene-placeholder {
+ color: var(--text-muted, rgba(255, 255, 255, 0.3));
+ font-size: 12px;
+}
+
+/* Characters */
+.props-characters {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 4px;
+ padding: 5px 8px;
+ border-radius: 6px;
+ background: var(--bg-primary, rgba(0, 0, 0, 0.2));
+ border: 1px solid var(--border-primary, rgba(255, 255, 255, 0.08));
+ cursor: pointer;
+ min-height: 30px;
+ align-items: center;
+ transition: border-color 0.15s;
+}
+
+.props-characters:hover {
+ border-color: rgba(255, 255, 255, 0.18);
+}
+
+.char-badge {
+ font-size: 10px !important;
+ padding: 1px 7px !important;
+ height: auto !important;
+ border-radius: 9999px !important;
+ background: rgba(232, 162, 67, 0.15) !important;
+ color: rgba(232, 162, 67, 0.9) !important;
+ border: none !important;
+}
+
+/* Textareas */
+.props-textarea {
+ width: 100%;
+ font-size: 12px;
+ line-height: 1.5;
+ padding: 6px 8px;
+ border-radius: 6px;
+ border: 1px solid var(--border-primary, rgba(255, 255, 255, 0.08));
+ background: var(--bg-primary, rgba(0, 0, 0, 0.2));
+ color: var(--text-primary, rgba(255, 255, 255, 0.9));
+ resize: vertical;
+ font-family: inherit;
+ transition: border-color 0.15s;
+}
+
+.props-textarea::placeholder {
+ color: var(--text-muted, rgba(255, 255, 255, 0.3));
+}
+
+.props-textarea:focus {
+ outline: none;
+ border-color: var(--accent, #e8a243);
+}
+
+.props-textarea--tall {
+ min-height: 60px;
+}
+
+/* Generate buttons */
+.props-actions {
+ display: flex;
+ flex-direction: column;
+ gap: 6px;
+ padding-top: 4px;
+}
+
+.props-gen-btn {
+ width: 100%;
+ font-size: 12px !important;
+ height: 32px !important;
+ justify-content: center;
+ gap: 6px;
+}
+
+/* Empty state */
+.props-empty {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: var(--text-muted, rgba(255, 255, 255, 0.3));
+ font-size: 12px;
+}
+
+.props-empty p {
+ margin: 0;
+}
+</style>
diff --git a/web/src/views/drama/episode/workbench/StoryboardEditor.vue b/web/src/views/drama/episode/workbench/StoryboardEditor.vue
new file mode 100644
index 0000000..cd8e412
--- /dev/null
+++ b/web/src/views/drama/episode/workbench/StoryboardEditor.vue
@@ -0,0 +1,121 @@
+<script setup lang="ts">
+import { Button } from '@/components/ui/button'
+import { ArrowLeft } from 'lucide-vue-next'
+import type { Storyboard, Character, Scene } from '@/types/drama'
+import type { ImageGeneration } from '@/types/image'
+import StoryboardStrip from './StoryboardStrip.vue'
+import PreviewPane from './PreviewPane.vue'
+import PropertiesPanel from './PropertiesPanel.vue'
+
+defineProps<{
+ storyboards: Storyboard[]
+ currentStoryboard: Storyboard | null
+ currentId: string | null
+ characters: Character[]
+ scenes: Scene[]
+ images: ImageGeneration[]
+ videoUrl: string | null
+}>()
+
+const emit = defineEmits<{
+ select: [id: string]
+ back: []
+ add: []
+ saveField: [field: string, value: any]
+ generateImage: []
+ generateVideo: []
+ showCharacterSelector: []
+ showSceneSelector: []
+}>()
+</script>
+
+<template>
+ <div class="editor-root">
+ <!-- Back button bar -->
+ <div class="editor-topbar">
+ <Button variant="ghost" size="sm" class="back-btn" @click="emit('back')">
+ <ArrowLeft :size="14" />
+ 返回网格
+ </Button>
+ <span v-if="currentStoryboard" class="topbar-title">
+ #{{ currentStoryboard.storyboard_number }}
+ {{ currentStoryboard.title || '' }}
+ </span>
+ </div>
+
+ <!-- Main three-column layout -->
+ <div class="editor-body">
+ <StoryboardStrip
+ :storyboards="storyboards"
+ :current-id="currentId"
+ @select="emit('select', $event)"
+ @add="emit('add')"
+ />
+
+ <PreviewPane
+ :storyboard="currentStoryboard"
+ :images="images"
+ :video-url="videoUrl"
+ />
+
+ <PropertiesPanel
+ :storyboard="currentStoryboard"
+ :characters="characters"
+ :scenes="scenes"
+ @save-field="(f: string, v: any) => emit('saveField', f, v)"
+ @generate-image="emit('generateImage')"
+ @generate-video="emit('generateVideo')"
+ @show-character-selector="emit('showCharacterSelector')"
+ @show-scene-selector="emit('showSceneSelector')"
+ />
+ </div>
+ </div>
+</template>
+
+<style scoped>
+.editor-root {
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ overflow: hidden;
+}
+
+.editor-topbar {
+ flex-shrink: 0;
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ padding: 4px 10px;
+ border-bottom: 1px solid var(--border-primary, rgba(255, 255, 255, 0.06));
+ background: var(--bg-secondary, rgba(0, 0, 0, 0.15));
+ height: 36px;
+}
+
+.back-btn {
+ font-size: 12px !important;
+ height: 26px !important;
+ padding: 0 8px !important;
+ gap: 4px;
+ color: var(--text-secondary, rgba(255, 255, 255, 0.55)) !important;
+}
+
+.back-btn:hover {
+ color: var(--text-primary, rgba(255, 255, 255, 0.9)) !important;
+}
+
+.topbar-title {
+ font-size: 12px;
+ font-weight: 500;
+ color: var(--text-primary, rgba(255, 255, 255, 0.9));
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.editor-body {
+ flex: 1;
+ min-height: 0;
+ display: flex;
+ flex-direction: row;
+}
+</style>
diff --git a/web/src/views/drama/episode/workbench/StoryboardStrip.vue b/web/src/views/drama/episode/workbench/StoryboardStrip.vue
new file mode 100644
index 0000000..1c54a6b
--- /dev/null
+++ b/web/src/views/drama/episode/workbench/StoryboardStrip.vue
@@ -0,0 +1,151 @@
+<script setup lang="ts">
+import { Plus } from 'lucide-vue-next'
+import { ScrollArea } from '@/components/ui/scroll-area'
+import { Button } from '@/components/ui/button'
+import type { Storyboard } from '@/types/drama'
+import { getImageUrl } from '@/utils/image'
+
+defineProps<{
+ storyboards: Storyboard[]
+ currentId: string | null
+}>()
+
+const emit = defineEmits<{
+ select: [id: string]
+ add: []
+}>()
+
+function thumbnailFor(sb: Storyboard): string {
+ return getImageUrl(sb)
+}
+</script>
+
+<template>
+ <div class="strip-root">
+ <ScrollArea class="strip-scroll">
+ <div class="strip-list">
+ <div
+ v-for="(sb, idx) in storyboards"
+ :key="sb.id"
+ class="strip-item"
+ :class="{ 'strip-item--active': sb.id === currentId }"
+ @click="emit('select', sb.id)"
+ >
+ <div class="strip-thumb">
+ <img
+ v-if="thumbnailFor(sb)"
+ :src="thumbnailFor(sb)"
+ :alt="`#${idx + 1}`"
+ class="strip-thumb__img"
+ />
+ <div v-else class="strip-thumb__empty">
+ {{ idx + 1 }}
+ </div>
+ </div>
+ <span class="strip-num">#{{ idx + 1 }}</span>
+ </div>
+ </div>
+ </ScrollArea>
+
+ <div class="strip-footer">
+ <Button variant="ghost" size="sm" class="strip-add-btn" @click="emit('add')">
+ <Plus :size="14" />
+ </Button>
+ </div>
+ </div>
+</template>
+
+<style scoped>
+.strip-root {
+ width: 80px;
+ flex-shrink: 0;
+ display: flex;
+ flex-direction: column;
+ border-right: 1px solid var(--border-primary, rgba(255, 255, 255, 0.06));
+ background: var(--bg-secondary, rgba(0, 0, 0, 0.15));
+}
+
+.strip-scroll {
+ flex: 1;
+ min-height: 0;
+}
+
+.strip-list {
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
+ padding: 6px 8px;
+}
+
+.strip-item {
+ position: relative;
+ width: 64px;
+ cursor: pointer;
+ border-radius: 6px;
+ border: 1.5px solid transparent;
+ overflow: hidden;
+ transition: border-color 0.15s ease;
+}
+
+.strip-item:hover {
+ border-color: rgba(255, 255, 255, 0.15);
+}
+
+.strip-item--active {
+ border-color: var(--accent, #e8a243);
+ box-shadow: 0 0 0 1px var(--accent, #e8a243);
+}
+
+.strip-thumb {
+ width: 100%;
+ aspect-ratio: 16 / 9;
+ background: var(--bg-primary, rgba(0, 0, 0, 0.2));
+ overflow: hidden;
+}
+
+.strip-thumb__img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ display: block;
+}
+
+.strip-thumb__empty {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 12px;
+ font-weight: 600;
+ color: var(--text-muted, rgba(255, 255, 255, 0.3));
+}
+
+.strip-num {
+ display: block;
+ text-align: center;
+ font-size: 9px;
+ font-weight: 500;
+ color: var(--text-secondary, rgba(255, 255, 255, 0.55));
+ padding: 2px 0;
+}
+
+.strip-footer {
+ flex-shrink: 0;
+ padding: 6px;
+ border-top: 1px solid var(--border-primary, rgba(255, 255, 255, 0.06));
+ display: flex;
+ justify-content: center;
+}
+
+.strip-add-btn {
+ width: 32px !important;
+ height: 32px !important;
+ padding: 0 !important;
+ color: var(--text-secondary, rgba(255, 255, 255, 0.55)) !important;
+}
+
+.strip-add-btn:hover {
+ color: var(--text-primary, rgba(255, 255, 255, 0.9)) !important;
+}
+</style>