fix: 修正视频引用素材缩略图布局

This commit is contained in:
GouJ committed 2026-09-24 18:10:21 +08:00
1 parent 680024b792
commit 8e402e2846
2 files changed
+30 -13

No files matched your search

@@ -470,8 +470,14 @@ async function inspectSpecs() {
<p class="mt-2 text-xs text-muted">以下是当前镜头的生成输入;已生成的视频可能使用更早的素材。</p> <p class="mt-2 text-xs text-muted">以下是当前镜头的生成输入;已生成的视频可能使用更早的素材。</p>
<div v-if="currentVideoInput" class="video-input-grid mt-4"> <div v-if="currentVideoInput" class="video-input-grid mt-4">
<article class="video-input-card"> <article class="video-input-card">
<AssetImage :src="currentVideoInput.providerInputKeyframe.imageUrl" <div class="video-input-image">
:alt="`镜头 ${shot.shotNo} 视频输入首帧`" preview object-fit="contain" /> <AssetImage
:src="currentVideoInput.providerInputKeyframe.imageUrl"
:alt="`镜头 ${shot.shotNo} 视频输入首帧`"
preview
object-fit="cover"
/>
</div>
<div class="min-w-0 p-2 text-center text-xs"> <div class="min-w-0 p-2 text-center text-xs">
<p class="font-medium">视频输入首帧</p> <p class="font-medium">视频输入首帧</p>
<p class="mt-1 text-[11px] text-muted"> <p class="mt-1 text-[11px] text-muted">
@@ -479,11 +485,19 @@ async function inspectSpecs() {
</p> </p>
</div> </div>
</article> </article>
<article v-for="reference in currentVideoInput.references" <article
:key="`${reference.subjectId}:${reference.imageId}`" class="video-input-card relative"> v-for="reference in currentVideoInput.references"
<span class="video-input-ref" :title="reference.subjectRef">{{ reference.subjectRef }}</span> :key="`${reference.subjectId}:${reference.imageId}`"
<AssetImage :src="reference.imageUrl" :alt="`${reference.subjectName} ${reference.subjectFormName} 参考图`" class="video-input-card"
preview object-fit="contain" /> >
<div class="video-input-image">
<AssetImage
:src="reference.imageUrl"
:alt="`${reference.subjectName} ${reference.subjectFormName} 参考图`"
preview
object-fit="cover"
/>
</div>
<div class="min-w-0 p-2 text-center text-xs"> <div class="min-w-0 p-2 text-center text-xs">
<p class="truncate font-medium" :title="reference.subjectName">{{ reference.subjectName }}</p> <p class="truncate font-medium" :title="reference.subjectName">{{ reference.subjectName }}</p>
<p class="mt-1 truncate text-[11px] text-muted" :title="reference.subjectFormName"> <p class="mt-1 truncate text-[11px] text-muted" :title="reference.subjectFormName">
@@ -754,12 +768,13 @@ async function inspectSpecs() {
@apply aspect-square rounded-none; @apply aspect-square rounded-none;
} }
.video-input-card { .video-input-card {
@apply min-w-0 overflow-hidden bg-(--app-control); @apply flex min-w-0 flex-col overflow-hidden bg-(--app-control);
} }
.video-input-ref { .video-input-image {
@apply pointer-events-none absolute top-2 left-2 z-1 max-w-[calc(100%-16px)] truncate px-1.5 py-1 font-mono text-[10px]; @apply aspect-square w-full overflow-hidden bg-(--app-subtle);
color: var(--app-inverse); }
background: rgb(0 0 0 / 68%); .video-input-image .asset-image {
@apply h-full w-full aspect-auto;
} }
.video-record { .video-record {
@apply min-w-0 overflow-hidden rounded-none bg-(--app-subtle); @apply min-w-0 overflow-hidden rounded-none bg-(--app-subtle);
+3 -1
View File
@@ -47,7 +47,9 @@ describe('镜头生产数据契约', () => {
expect(source).toMatch(/\.keyframe-card \.asset-image\s*\{[^}]*aspect-square/) expect(source).toMatch(/\.keyframe-card \.asset-image\s*\{[^}]*aspect-square/)
expect(source).toMatch(/\.production-video\s*\{[^}]*aspect-square/) expect(source).toMatch(/\.production-video\s*\{[^}]*aspect-square/)
expect(source).toMatch(/\.video-input-card\s*\{[^}]*bg-\(--app-control\)/) expect(source).toMatch(/\.video-input-card\s*\{[^}]*bg-\(--app-control\)/)
expect(source).toContain('class="video-input-ref" :title="reference.subjectRef"') expect(source).toMatch(/\.video-input-image\s*\{[^}]*aspect-square/)
expect(source).toContain('object-fit="cover"')
expect(source).not.toContain('class="video-input-ref"')
expect(source).not.toContain('{{ reference.subjectFormName }} · {{ reference.subjectRef }}') expect(source).not.toContain('{{ reference.subjectFormName }} · {{ reference.subjectRef }}')
expect(source).toMatch( expect(source).toMatch(
/@media \(max-width: 760px\)[\s\S]*?\.video-grid\s*\{[^}]*grid-cols-\[repeat\(2,_minmax\(0,_1fr\)\)\]/ /@media \(max-width: 760px\)[\s\S]*?\.video-grid\s*\{[^}]*grid-cols-\[repeat\(2,_minmax\(0,_1fr\)\)\]/