diff --git a/src/features/production/components/ShotProductionAssets.vue b/src/features/production/components/ShotProductionAssets.vue index f34be5e..ba0314f 100644 --- a/src/features/production/components/ShotProductionAssets.vue +++ b/src/features/production/components/ShotProductionAssets.vue @@ -521,7 +521,7 @@ async function inspectSpecs() { 。请检查候选视频和校验结果,调整提示词或参考资产后再重新生成。 -
+
-
+
主视频 @@ -724,13 +724,14 @@ async function inspectSpecs() { @apply mt-4 flex min-h-[34px] flex-wrap items-center gap-3; } .keyframe-grid { - @apply grid grid-cols-[repeat(auto-fill,_minmax(180px,_1fr))] gap-3; + @apply grid gap-3; + grid-template-columns: repeat(auto-fill, minmax(180px, 220px)); } .keyframe-card { @apply relative overflow-hidden rounded-none bg-(--app-subtle); } .keyframe-card .asset-image { - @apply aspect-video rounded-none; + @apply aspect-square rounded-none; } .keyframe-image { @apply relative; @@ -743,24 +744,25 @@ async function inspectSpecs() { 0 0 0 1px rgb(0 0 0 / 55%), 0 2px 8px rgb(0 0 0 / 35%); } +.video-input-grid, +.video-grid { + @apply grid gap-3; + grid-template-columns: repeat(auto-fill, minmax(180px, 220px)); +} +.video-input-grid .asset-image { + @apply aspect-square rounded-none; +} .video-record { - @apply flex overflow-hidden rounded-none bg-(--app-subtle); + @apply min-w-0 overflow-hidden rounded-none bg-(--app-subtle); } .production-video { - @apply w-[min(44%,390px)] min-h-[170px] bg-ink object-contain; + @apply block w-full aspect-square bg-[#080808] object-contain; } @media (max-width: 760px) { - .keyframe-grid { + .keyframe-grid, + .video-input-grid, + .video-grid { @apply grid-cols-[repeat(2,_minmax(0,_1fr))]; } - .video-record { - @apply block; - } - .production-video { - @apply w-full; - } -} -.production-video { - @apply bg-[#080808]; } diff --git a/tests/features/production/production.test.ts b/tests/features/production/production.test.ts index 20531e9..4033a3b 100644 --- a/tests/features/production/production.test.ts +++ b/tests/features/production/production.test.ts @@ -38,14 +38,16 @@ describe('镜头生产数据契约', () => { ) }) - it('首帧候选使用紧凑的自动填充网格,不随少量图片撑满整行', () => { + it('首帧、素材引用和视频使用固定上限的正方形网格,不随少量记录撑满整行', () => { const source = readFileSync('src/features/production/components/ShotProductionAssets.vue', 'utf8') expect(source).toContain('v-if="keyframeCandidates.length" class="keyframe-grid mt-4"') + expect(source).toContain('v-if="videos.length" class="video-grid mt-4"') + expect(source).toMatch(/\.keyframe-grid\s*\{[^}]*grid-template-columns:\s*repeat\(auto-fill, minmax\(180px, 220px\)\)/) + expect(source).toMatch(/\.video-input-grid,[\s\S]*?\.video-grid\s*\{[^}]*grid-template-columns:\s*repeat\(auto-fill, minmax\(180px, 220px\)\)/) + expect(source).toMatch(/\.keyframe-card \.asset-image\s*\{[^}]*aspect-square/) + expect(source).toMatch(/\.production-video\s*\{[^}]*aspect-square/) expect(source).toMatch( - /\.keyframe-grid\s*\{[^}]*grid-cols-\[repeat\(auto-fill,_minmax\(180px,_1fr\)\)\][^}]*gap-3/ - ) - expect(source).toMatch( - /@media \(max-width: 760px\)[\s\S]*?\.keyframe-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\)\)\]/ ) })