fix: 收紧镜头素材与视频网格尺寸

This commit is contained in:
GouJ committed 2026-09-24 17:26:23 +08:00
1 parent 8cdaf33936
commit 553297ff50
2 files changed
+25 -21

No files matched your search

+7 -5
View File
@@ -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\)\)\]/
)
})