From a72d96506a98de31122c430a04bb67e4de638e96 Mon Sep 17 00:00:00 2001 From: GouJ Date: Wed, 23 Sep 2026 11:01:43 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E7=BC=A9=E5=B0=8F=E9=95=9C=E5=A4=B4?= =?UTF-8?q?=E9=A6=96=E5=B8=A7=E5=80=99=E9=80=89=E5=8D=A1=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../production/components/ShotProductionAssets.vue | 2 +- tests/features/production/production.test.ts | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/features/production/components/ShotProductionAssets.vue b/src/features/production/components/ShotProductionAssets.vue index 87096db..9c6d1d9 100644 --- a/src/features/production/components/ShotProductionAssets.vue +++ b/src/features/production/components/ShotProductionAssets.vue @@ -589,7 +589,7 @@ async function inspectSpecs() { @apply mt-4 flex min-h-[34px] flex-wrap items-center gap-3; } .keyframe-grid { - @apply grid grid-cols-[repeat(3,_minmax(0,_1fr))] gap-3; + @apply grid grid-cols-[repeat(auto-fill,_minmax(180px,_1fr))] gap-3; } .keyframe-card { @apply overflow-hidden rounded-none bg-(--app-subtle); diff --git a/tests/features/production/production.test.ts b/tests/features/production/production.test.ts index 930591d..d1eca65 100644 --- a/tests/features/production/production.test.ts +++ b/tests/features/production/production.test.ts @@ -38,6 +38,16 @@ describe('镜头生产数据契约', () => { ) }) + it('首帧候选使用紧凑的自动填充网格,不随少量图片撑满整行', () => { + const source = readFileSync('src/features/production/components/ShotProductionAssets.vue', 'utf8') + 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\)\)\]/ + ) + }) + it('可选尺寸必须成对留空或填写正整数', () => { expect(validOptionalSize('', '')).toBe(true) expect(validOptionalSize(1920, 1080)).toBe(true)