style: 统一镜头生产阶段操作区间距

This commit is contained in:
GouJ committed 2026-09-23 09:37:48 +08:00
1 parent de26dd0c19
commit 3888ca0538
2 files changed
+21 -7

No files matched your search

@@ -287,7 +287,7 @@ async function inspectSpecs() {
{{ issueLabel(issue.code) }}:{{ issue.reason }}
</li>
</ul>
<div class="mt-4">
<div class="production-stage-actions">
<ConfirmAction
:label="promptReadiness?.status === 'skipped' ? '重新生成本镜提示词' : '生成本镜提示词'"
:disabled="!canGeneratePrompt"
@@ -381,11 +381,13 @@ async function inspectSpecs() {
</article>
</div>
<p v-else class="mt-4 text-xs text-muted">尚无首帧记录。</p>
<NButton :disabled="!canGenerateKeyframe" @click="keyframeOpen = true" class="mt-4"
><ImagePlus :size="14" />{{
keyframeStale ? '重新生成主首帧' : currentKeyframe ? '再生成一张候选' : '生成首帧'
}}</NButton
>
<div class="production-stage-actions">
<NButton :disabled="!canGenerateKeyframe" @click="keyframeOpen = true"
><ImagePlus :size="14" />{{
keyframeStale ? '重新生成主首帧' : currentKeyframe ? '再生成一张候选' : '生成首帧'
}}</NButton
>
</div>
</div>
<div class="production-stage">
@@ -484,7 +486,7 @@ async function inspectSpecs() {
<p v-if="videos.some(item => !item.isPrimary)" class="mt-3 text-xs text-muted">
候选视频的历史质量结果未公开;手动设为主视频前需在本会话完成视觉校验。自动质量任务的晋升结果以刷新后的主视频标记为准。
</p>
<div class="mt-4 flex flex-wrap gap-3">
<div class="production-stage-actions">
<ConfirmAction
:label="
videoStale ? '重新生成质量视频' : currentVideo ? '再生成一个质量候选' : '提交本镜视频质量任务'
@@ -583,6 +585,9 @@ async function inspectSpecs() {
.production-stage-heading {
@apply flex items-start justify-between gap-4;
}
.production-stage-actions {
@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;
}
@@ -1,5 +1,6 @@
import { flushPromises, mount, type VueWrapper } from '@vue/test-utils'
import { afterEach, describe, expect, it, vi } from 'vitest'
import { readFileSync } from 'node:fs'
import { mediaAssetUrl } from '@/lib/assets'
import KeyframeDialog from '@/features/production/components/KeyframeDialog.vue'
import { productionApi } from '@/features/production/api'
@@ -29,6 +30,14 @@ function button(label: string): HTMLButtonElement {
}
describe('镜头生产数据契约', () => {
it('三个生产阶段使用统一的块级操作区,保证卡片、按钮和下一阶段之间有稳定间距', () => {
const source = readFileSync('src/features/production/components/ShotProductionAssets.vue', 'utf8')
expect(source.match(/class="production-stage-actions"/g)).toHaveLength(3)
expect(source).toMatch(
/\.production-stage-actions\s*\{[^}]*mt-4[^}]*min-h-\[34px\][^}]*items-center[^}]*gap-3/
)
})
it('可选尺寸必须成对留空或填写正整数', () => {
expect(validOptionalSize('', '')).toBe(true)
expect(validOptionalSize(1920, 1080)).toBe(true)