fix: 收紧镜头素材与视频网格尺寸
This commit is contained in:
1 parent
8cdaf33936
commit
553297ff50
2 files changed
+25
-21
No files matched your search
@@ -521,7 +521,7 @@ async function inspectSpecs() {
|
||||
。请检查候选视频和校验结果,调整提示词或参考资产后再重新生成。
|
||||
</template>
|
||||
</NAlert>
|
||||
<div v-if="videos.length" class="mt-4 space-y-3">
|
||||
<div v-if="videos.length" class="video-grid mt-4">
|
||||
<article v-for="item in videos" :key="item.id" class="video-record">
|
||||
<video
|
||||
v-if="item.status === 'completed' && safeVideoUrl(item.videoUrl)"
|
||||
@@ -530,7 +530,7 @@ async function inspectSpecs() {
|
||||
preload="metadata"
|
||||
class="production-video"
|
||||
></video>
|
||||
<div class="min-w-0 flex-1 p-4">
|
||||
<div class="min-w-0 p-3">
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<StatusBadge :status="item.status" :label="productionStatusLabel(item.status)" />
|
||||
<NTag v-if="item.isPrimary" size="small" :bordered="false">主视频</NTag>
|
||||
@@ -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];
|
||||
}
|
||||
</style>
|
||||
@@ -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\)\)\]/
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user