diff --git a/src/features/production/components/ShotProductionAssets.vue b/src/features/production/components/ShotProductionAssets.vue
index 5ec71de..fce31ab 100644
--- a/src/features/production/components/ShotProductionAssets.vue
+++ b/src/features/production/components/ShotProductionAssets.vue
@@ -601,15 +601,41 @@ defineExpose({ inspectSpecs, inspecting })
:messages="videoIssueMessages"
/>
-
+
+
首帧或参考图已变化,请重新生成视频。
+
+
+
+
+
+ {{ videoCandidates.length ? '尚无已确认主视频,请在候选中检查并选择。' : '尚无视频任务记录。' }}
+
+
+
{{ videoInputPlan.inputMode === 'omni_reference' ? '使用多张参考图' : '使用首帧' }}
{{ videoInputPlan.reasons.map(productionMessage).join(';') }}
-
-
首帧或参考图已变化,请重新生成视频。
-
-
-
-
-
-
- {{ videoCandidates.length ? '尚无已确认主视频,请在候选中检查并选择。' : '尚无视频任务记录。' }}
-
管理候选({{ videoCandidates.length }})
@@ -945,10 +951,15 @@ defineExpose({ inspectSpecs, inspecting })
.keyframe-card .asset-image {
@apply aspect-square rounded-none;
}
-/* 素材按可用宽度等分列,自动收起空列,让首尾卡片与内容区左右边缘对齐。 */
+/* 素材背景与标题铺满外层内容宽度。 */
+.video-input-section {
+ width: 100%;
+}
+/* 单行按 220px 紧凑排列;放不下时网格铺满可用宽度,自动换行并等分列,左右贴齐。 */
.video-input-grid {
@apply grid w-full gap-3;
- grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
+ max-width: calc(var(--video-input-count) * 220px + (var(--video-input-count) - 1) * 12px);
+ grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}
.video-input-grid .asset-image {
@apply aspect-square rounded-none;
diff --git a/tests/features/production/production.test.ts b/tests/features/production/production.test.ts
index fcec82c..43921b2 100644
--- a/tests/features/production/production.test.ts
+++ b/tests/features/production/production.test.ts
@@ -46,12 +46,17 @@ describe('镜头生产数据契约', () => {
expect(source).toMatch(/\.generation-input-mode-label\s*\{[^}]*mb-\[7px\][^}]*text-xs/)
})
- it('主首帧与主视频共用固定宽度,素材引用保留正方形网格', () => {
+ it('素材外层铺满,单行保持紧凑方图,换行后按可用宽度等分', () => {
const source = readFileSync('src/features/production/components/ShotProductionAssets.vue', 'utf8')
expect(source).toContain('v-if="currentVideo" class="video-grid mt-4"')
expect(source).toMatch(/\.keyframe-grid,\s*\.video-grid\s*\{[^}]*max-w-\[260px\][^}]*grid-cols-1/)
expect(source).toMatch(
- /\.video-input-grid\s*\{[^}]*grid-template-columns:\s*repeat\(auto-fit, minmax\(min\(180px, 100%\), 1fr\)\)/
+ /\.video-input-grid\s*\{[^}]*grid-template-columns:\s*repeat\(auto-fit, minmax\(min\(220px, 100%\), 1fr\)\)/
+ )
+ expect(source).toContain("'--video-input-count': (currentVideoInput?.references.length ?? 0) + 1")
+ expect(source).toMatch(/\.video-input-section\s*\{\s*width:\s*100%;\s*\}/)
+ expect(source).toMatch(
+ /\.video-input-grid\s*\{[^}]*max-width:\s*calc\(var\(--video-input-count\) \* 220px \+ \(var\(--video-input-count\) - 1\) \* 12px\)/
)
expect(source).toMatch(/\.keyframe-card \.asset-image\s*\{[^}]*aspect-square/)
const videoCard = readFileSync('src/features/production/components/VideoCard.vue', 'utf8')