perf(short-drama-agent-front): 优化制作工作台交互与移动端布局

This commit is contained in:
GJ committed 2026-10-10 19:28:47 +08:00
1 parent b5eaed3981
commit 54a381ebd3
37 files changed
+1217 -426

No files matched your search

@@ -4,20 +4,18 @@ import { useActionMessage } from '../../../components/ui/useActionMessage'
import ProviderInputInspector from './ProviderInputInspector.vue'
import { NAlert, NButton, NCollapse, NCollapseItem, NSelect, NTag } from 'naive-ui'
import { computed, onScopeDispose, ref, watch } from 'vue'
import { ExternalLink, ImagePlus, RefreshCw } from '@lucide/vue'
import { AssetImage, StatusBadge } from '../../../components/ui'
import { ImagePlus, RefreshCw } from '@lucide/vue'
import { AssetImage } from '../../../components/ui'
import { usePolling } from '../../../composables/usePolling'
import { useQuery } from '../../../composables/useQuery'
import { mediaAssetUrl } from '../../../lib/assets'
import { errorMessage } from '../../../lib/http'
import { formatDate } from '../../../lib/format'
import type { DesignedShot } from '../../storyboard/types'
import { storyboardApi } from '../../storyboard/api'
import ConfirmAction from '../../workflows/ConfirmAction.vue'
import { runOperation } from '../../workflows/operations'
import { productionApi } from '../api'
import { qualityApi } from '../quality-api'
import { isActiveVideo, primaryKeyframe, primaryVideo, productionStatusLabel, videoQualityStatusLabel } from '../model'
import { isActiveVideo, primaryKeyframe, primaryVideo, productionStatusLabel, videoRecordedValidation } from '../model'
import { productionIssueText, productionMessage } from '../production-messages'
import type {
GenerateKeyframeInput,
@@ -29,10 +27,11 @@ import type {
} from '../types'
import KeyframeDialog from './KeyframeDialog.vue'
import KeyframeCard from './KeyframeCard.vue'
import VideoCard from './VideoCard.vue'
import ProductionStageStatus from './ProductionStageStatus.vue'
import QualityDialog from './QualityDialog.vue'
import VideoQualityDiagnostics from './VideoQualityDiagnostics.vue'
import KeyframeValidationHistory from './KeyframeValidationHistory.vue'
import ActionMenu from '../../../components/ui/ActionMenu.vue'
import { AppDialog } from '../../../components/ui'
import ModelCapabilities from './ModelCapabilities.vue'
import type { QualityTarget } from '../quality.types'
@@ -138,10 +137,19 @@ const currentVideoInput = computed(() =>
)
const keyframes = computed(() => query.data.value?.keyframes ?? [])
const videos = computed(() => query.data.value?.videos ?? [])
/** 当前镜头尚未结束的首帧任务数量,包含等待提交和生成中。 */
const activeKeyframeCount = computed(
() => keyframes.value.filter(item => ['pending', 'generating'].includes(item.status)).length
)
/** 当前镜头尚未结束的视频任务数量,包含等待提交、排队和生成中。 */
const activeVideoCount = computed(() => videos.value.filter(isActiveVideo).length)
const videoQualityStatus = computed(() => query.data.value?.qualityStatus ?? null)
const videoInputPlan = computed(() => query.data.value?.inputPlan ?? null)
const currentKeyframe = computed(() => primaryKeyframe(keyframes.value))
/** 主区只展示正式成功主视频,不用候选代替尚未确认的主视频。 */
const currentVideo = computed(() => primaryVideo(videos.value))
/** 其它视频记录统一放入候选弹窗,包含生成中和失败记录。 */
const videoCandidates = computed(() => videos.value.filter(item => item.id !== currentVideo.value?.id))
const activeVideo = computed(() => videos.value.find(isActiveVideo))
const assetBlocked = computed(() => props.disabled || !!query.error.value)
/**
@@ -158,6 +166,14 @@ watch(
)
const qualityOpen = ref(false)
const candidatesOpen = ref(false)
/** 视频候选仅在用户打开弹窗后展示。 */
const videoCandidatesOpen = ref(false)
/** 仅点击视频卡片入口后显示已有质量记录。 */
const videoHistoryOpen = ref(false)
/** 当前查看记录的视频 ID,按资产隔离主视频和候选。 */
const videoHistoryId = ref('')
/** 记录弹窗中的视频是否为需要更新的当前主视频。 */
const videoHistoryStale = computed(() => videoHistoryId.value === currentVideo.value?.id && videoStale.value)
const qualityTarget = ref<QualityTarget | null>(null)
const specsOpen = ref(false)
const generationCatalog = ref<GenerationModelCatalog | null>(null)
@@ -197,9 +213,14 @@ watch(
{ immediate: true }
)
/** 从实际候选打开质量面板,保留单镜头主操作。 */
/**
* 从实际候选打开质量面板,先关闭候选弹窗,避免遮挡费用与操作确认。
* @param kind 需要检查的资产种类
* @param assetId 当前选中的真实资产编号
*/
function openQuality(kind: 'keyframe' | 'video', assetId: string) {
candidatesOpen.value = false
videoCandidatesOpen.value = false
qualityTarget.value = {
kind,
shotId: props.shot.shotId,
@@ -208,6 +229,15 @@ function openQuality(kind: 'keyframe' | 'video', assetId: string) {
}
qualityOpen.value = true
}
/**
* 从主视频或候选卡片打开只读记录,关闭候选弹窗以避免弹窗叠加。
* @param videoId 当前选中视频 ID
*/
function openVideoHistory(videoId: string) {
videoCandidatesOpen.value = false
videoHistoryId.value = videoId
videoHistoryOpen.value = true
}
/** 只打开当前镜头的有限质量重跑表单,费用确认后才发送任务。 */
function openShotKeyframeQuality() {
if (!props.episodeNo || !canGenerateKeyframe.value) return
@@ -221,7 +251,12 @@ function openShotKeyframeQuality() {
}
/** 当前查看历史的候选 ID;历史记录在独立弹窗内按候选隔离。 */
const historyKeyframeId = ref('')
/** 首帧校验历史弹窗的显示状态。 */
const historyOpen = ref(false)
/**
* 打开指定首帧的校验历史,供主首帧与候选卡片共用。
* @param keyframeId 需要查看历史的首帧 ID
*/
function openKeyframeHistory(keyframeId: string) {
historyKeyframeId.value = keyframeId
historyOpen.value = true
@@ -254,9 +289,9 @@ const canGenerateVideo = computed(
)
const keyframeStale = computed(() => !!props.keyframeReadiness?.primaryKeyframeStale)
/** 当前主首帧的持久化质量状态,避免会话缓存与按钮状态冲突。 */
const primaryQualityKey = computed(() => currentKeyframe.value
? JSON.stringify([props.shot.shotId, currentKeyframe.value.id, reviewRevision.value])
: '')
const primaryQualityKey = computed(() =>
currentKeyframe.value ? JSON.stringify([props.shot.shotId, currentKeyframe.value.id, reviewRevision.value]) : ''
)
const primaryQualityQuery = useQuery(primaryQualityKey, (value, signal) => {
if (!value) return Promise.resolve(null)
const [shotId, keyframeId] = JSON.parse(value) as [string, string, number]
@@ -273,6 +308,19 @@ async function refreshAfterReview() {
await refreshAll()
}
const keyframeCandidates = computed(() => keyframes.value.filter(item => item.id !== currentKeyframe.value?.id))
/**
* 按候选数量计算弹窗宽度,每项 260px,每行最多五项,预留间距和左右内边距。
* @param count 当前候选数量
* @returns 弹窗的期望宽度,单位为像素
*/
function candidateDialogWidth(count: number): number {
const columns = Math.max(1, Math.min(5, count))
return columns * 260 + (columns - 1) * 12 + 48
}
/** 首帧弹窗按当前候选数适配一至五列,实际宽度由公共弹窗限制在视口内。 */
const keyframeCandidatesWidth = computed(() => candidateDialogWidth(keyframeCandidates.value.length))
/** 视频弹窗与首帧共用固定列宽,少量候选不留多余的整列空白。 */
const videoCandidatesWidth = computed(() => candidateDialogWidth(videoCandidates.value.length))
/** 仅用于本会话即时提示;最终质量判定以持久化审核结果为准。 */
function keyframePassed(assetId: string) {
return sessionKeyframePassed(props.projectId, props.shot.shotId, assetId)
@@ -287,16 +335,14 @@ watch(key, () => {
historyOpen.value = false
historyKeyframeId.value = ''
confirmingVideo.value = ''
videoCandidatesOpen.value = false
videoHistoryOpen.value = false
videoHistoryId.value = ''
keyframeSpec.value = null
videoSpec.value = null
specError.value = ''
})
/** 只返回通过协议和 /storage 限制的视频地址。 */
function safeVideoUrl(value: string | null): string | null {
return value ? mediaAssetUrl(value) : null
}
/** 重新读取单镜头资产,并通知父页刷新项目就绪状态。 */
async function refreshAll() {
await Promise.all([query.refresh(), promptQuery.refresh(), videoInputQuery.refresh()])
@@ -433,38 +479,28 @@ async function inspectSpecs() {
specError.value = [...new Set(errors)].join(' ')
inspecting.value = false
}
/** 将只读检查入口与读取状态交给镜头标题行,保留弹窗在资产组件内管理。 */
defineExpose({ inspectSpecs, inspecting })
</script>
<template>
<section class="production-assets">
<div class="flex flex-wrap items-center justify-between gap-3">
<div>
<h4 class="text-sm font-semibold">镜头生产资产</h4>
</div>
<div class="flex gap-3">
<ActionMenu
label="镜头资产更多操作"
:items="[{ key: 'specs', label: '检查生成规格与模型限制', disabled: inspecting }]"
@select="inspectSpecs"
/>
</div>
</div>
<NAlert v-if="query.error.value" role="alert" type="error" :show-icon="false" class="mt-4"
>{{ query.error.value }} 当前保留上次成功读取的资产,操作已暂停。
</NAlert>
<div class="production-stage mt-5">
<div class="production-stage">
<div class="production-stage-heading">
<div>
<h5 class="text-sm font-medium">01 · 视频提示词</h5>
</div>
<StatusBadge
v-if="promptReadiness"
:status="promptReadiness.status"
:label="productionStatusLabel(promptReadiness.status)"
<!-- 以下是视频提示词状态与对应原因入口模块 -->
<ProductionStageStatus
:status="promptReadiness?.status"
:label="promptReadiness ? productionStatusLabel(promptReadiness.status) : undefined"
:messages="(promptReadiness?.issues ?? []).map(productionIssueText)"
/>
</div>
<IssueHint :messages="(promptReadiness?.issues ?? []).map(productionIssueText)" />
<div v-if="savedPrompt?.videoPrompt" class="surface-inset mt-4 p-4" aria-label="本镜视频提示词">
<p class="text-xs font-medium">本镜视频提示词</p>
<p class="mt-3 whitespace-pre-wrap break-words text-sm leading-6">{{ savedPrompt.videoPrompt }}</p>
@@ -506,13 +542,15 @@ async function inspectSpecs() {
<div>
<h5 class="text-sm font-medium">02 · 首帧</h5>
</div>
<StatusBadge
v-if="keyframeReadiness"
:status="keyframeReadiness.status"
:label="keyframeStale ? '主首帧已过期' : productionStatusLabel(keyframeReadiness.status)"
<!-- 以下是首帧状态与对应原因入口模块,过期使用警告色 -->
<ProductionStageStatus
:status="keyframeReadiness?.status"
:label="keyframeReadiness ? productionStatusLabel(keyframeReadiness.status) : undefined"
:warning-label="keyframeStale ? '主首帧已过期' : undefined"
:messages="(keyframeReadiness?.issues ?? []).map(productionIssueText)"
/>
</div>
<IssueHint :messages="(keyframeReadiness?.issues ?? []).map(productionIssueText)" />
<!-- 以下是主首帧卡片模块,校验历史通过卡片入口在弹窗内查看 -->
<div v-if="currentKeyframe" class="keyframe-grid mt-4">
<KeyframeCard
:shot-id="shot.shotId"
@@ -524,18 +562,10 @@ async function inspectSpecs() {
:validation-passed="keyframePassed(currentKeyframe.id)"
:confirming="false"
@quality="openQuality('keyframe', currentKeyframe.id)"
@history="openKeyframeHistory(currentKeyframe.id)"
/>
</div>
<p v-else class="mt-4 text-xs text-muted">尚无已确认主首帧。请生成候选,完成质量检查后再设为主首帧。</p>
<!-- 以下是当前主首帧的只读视觉校验历史模块 -->
<KeyframeValidationHistory
v-if="currentKeyframe"
:key="currentKeyframe.id"
:project-id="projectId"
:shot-id="shot.shotId"
:keyframe-id="currentKeyframe.id"
class="mt-3"
/>
<NAlert
v-if="currentKeyframe && keyframePassed(currentKeyframe.id) === false"
type="error"
@@ -554,6 +584,10 @@ async function inspectSpecs() {
<NButton v-if="keyframeCandidates.length" @click="candidatesOpen = true">
管理候选({{ keyframeCandidates.length }})
</NButton>
<!-- 以下是首帧候选任务进行中的数量提示模块 -->
<NTag v-if="activeKeyframeCount" size="small" type="warning" :bordered="false" role="status">
首帧任务进行中({{ activeKeyframeCount }})
</NTag>
<NButton :disabled="!canGenerateKeyframe" @click="keyframeOpen = true"
><ImagePlus :size="14" />{{
keyframeStale ? '生成替代候选' : currentKeyframe ? '再生成一张候选' : '生成首帧候选'
@@ -567,10 +601,12 @@ async function inspectSpecs() {
<div>
<h5 class="text-sm font-medium">03 · 视频</h5>
</div>
<StatusBadge
v-if="videoReadiness"
:status="videoReadiness.status"
:label="videoStale ? '主视频已过期' : productionStatusLabel(videoReadiness.status)"
<!-- 以下是视频状态与对应原因入口模块,需更新使用警告色 -->
<ProductionStageStatus
:status="videoReadiness?.status"
:label="videoReadiness ? productionStatusLabel(videoReadiness.status) : undefined"
:warning-label="videoStale ? '主视频需更新' : undefined"
:messages="videoIssueMessages"
/>
</div>
<div v-if="videoInputPlan" class="mt-3 flex flex-wrap items-center gap-2 text-xs">
@@ -579,7 +615,8 @@ async function inspectSpecs() {
</NTag>
<span class="text-muted">{{ videoInputPlan.reasons.map(productionMessage).join(';') }}</span>
</div>
<IssueHint :messages="videoIssueMessages" />
<!-- 以下是主视频素材变化说明模块,与此前画面检查结论分别说明 -->
<p v-if="videoStale" class="mt-3 text-xs text-muted">首帧或参考图已变化,请重新生成视频。</p>
<section class="surface-inset mt-4 p-4" aria-label="当前视频生成素材引用">
<div class="flex flex-wrap items-center justify-between gap-2">
<h6 class="text-xs font-medium">视频使用的素材</h6>
@@ -645,107 +682,34 @@ async function inspectSpecs() {
</div>
</div>
</section>
<div
v-if="videoQualityStatus && videoQualityStatus.status !== 'not_started'"
class="mt-3 flex items-center gap-2"
>
<NTag
size="small"
:type="
videoQualityStatus.status === 'passed'
? 'success'
: videoQualityStatus.status === 'exhausted'
? 'error'
: 'info'
<!-- 以下是主视频展示模块,其它记录在候选弹窗中查看 -->
<div v-if="currentVideo" class="video-grid mt-4">
<VideoCard
:item="currentVideo"
:shot-no="shot.shotNo"
:duration-seconds="shot.durationSeconds"
:stale="videoStale"
:blocked="assetBlocked"
:validation-passed="sessionVideoValidation(projectId, shot.shotId, currentVideo.id)?.passed ?? null"
:recorded-validation-passed="
videoRecordedValidation(videoQualityStatus, shot.shotId, currentVideo.id)
"
:bordered="false"
>
{{
videoQualityStatus.status === 'passed'
? '视频检查通过'
: videoQualityStatusLabel(videoQualityStatus.status)
}}
:confirming="false"
@quality="openQuality('video', currentVideo.id)"
@history="openVideoHistory(currentVideo.id)"
/>
</div>
<p v-else class="mt-4 text-xs text-muted">
{{ videoCandidates.length ? '尚无已确认主视频,请在候选中检查并选择。' : '尚无视频任务记录。' }}
</p>
<!-- 以下是视频候选弹窗入口模块 -->
<div v-if="videoCandidates.length" class="mt-4 flex flex-wrap gap-3">
<NButton @click="videoCandidatesOpen = true">管理候选({{ videoCandidates.length }})</NButton>
<!-- 以下是视频候选任务进行中的数量提示模块 -->
<NTag v-if="activeVideoCount" size="small" type="warning" :bordered="false" role="status">
视频任务进行中({{ activeVideoCount }})
</NTag>
</div>
<!-- 以下是当前镜头只读视频质量详情与失败归因模块 -->
<VideoQualityDiagnostics :key="shot.shotId" :shot-id="shot.shotId" class="mt-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)"
:src="safeVideoUrl(item.videoUrl) || undefined"
controls
preload="metadata"
class="production-video"
></video>
<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>
<NTag v-if="!item.isPrimary" size="small" :bordered="false">候选视频</NTag>
<NTag v-if="item.isPrimary && videoStale" size="small" :bordered="false">已过期</NTag>
<span class="text-[10px] text-muted"
>{{ item.durationSeconds || shot.durationSeconds || '—' }}s</span
>
</div>
<NAlert v-if="item.error" role="alert" type="error" :show-icon="false" class="mt-3">{{
item.error
}}</NAlert>
<p class="mt-3 break-all text-[10px] text-muted">
{{ item.provider }} · {{ item.model }} · {{ formatDate(item.createdAt) }}
</p>
<div class="mt-3 flex flex-wrap gap-3">
<NButton
v-if="item.status === 'completed' && item.videoUrl"
text
size="small"
@click="openQuality('video', item.id)"
>质量检查<template v-if="sessionVideoValidation(projectId, item.shotId, item.id)">
·
{{
sessionVideoValidation(projectId, item.shotId, item.id)?.passed
? '曾通过'
: '未通过'
}}</template
></NButton
>
<a
v-if="safeVideoUrl(item.videoUrl)"
:href="safeVideoUrl(item.videoUrl) || undefined"
target="_blank"
rel="noopener noreferrer"
class="text-button"
>打开视频<ExternalLink :size="12"
/></a>
<NButton
v-if="
item.status === 'completed' &&
item.videoUrl &&
!item.isPrimary &&
sessionVideoValidation(projectId, item.shotId, item.id)?.passed === true
"
:disabled="assetBlocked"
@click="confirmingVideo = item.id"
text
size="small"
>
设为主视频
</NButton>
</div>
<NAlert v-if="confirmingVideo === item.id" type="info" :show-icon="false" class="mt-3 text-xs"
><p>确认把此候选设为当前镜头主视频?旧成片仍会保留。</p>
<div class="mt-2 flex gap-3">
<NButton @click="setPrimaryVideo" type="primary">确认切换</NButton>
<NButton @click="confirmingVideo = ''" text size="small">取消</NButton>
</div></NAlert
>
</div>
</article>
</div>
<p v-else class="mt-4 text-xs text-muted">尚无视频任务记录。</p>
<p v-if="videos.some(item => !item.isPrimary)" class="mt-3 text-xs text-muted">
质量链状态来自后端持久化记录;手动晋升候选仍需在当前页面完成一次视觉校验。自动质量任务通过后会直接更新主视频。
</p>
<section
v-if="generationCatalog"
class="generation-settings-panel surface-inset mt-4"
@@ -861,13 +825,10 @@ async function inspectSpecs() {
v-model:open="candidatesOpen"
title="首帧候选管理"
description="先完成质量检查;只有本会话校验通过的候选才能设为主首帧。"
wide
:width="keyframeCandidatesWidth"
>
<!-- 候选图片和对应的人工复核入口按相同候选 ID 分组。 -->
<div
v-if="keyframeCandidates.length"
class="mt-4 grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] items-start gap-3 max-[760px]:grid-cols-1"
>
<div v-if="keyframeCandidates.length" class="asset-candidate-grid mt-4">
<div v-for="item in keyframeCandidates" :key="item.id" class="min-w-0">
<KeyframeCard
:shot-id="shot.shotId"
@@ -888,6 +849,49 @@ async function inspectSpecs() {
</div>
<p v-else class="text-xs text-muted">暂无其它首帧候选。</p>
</AppDialog>
<!-- 以下是视频候选管理弹窗模块,复用主视频卡片操作与公共弹窗滚动布局 -->
<AppDialog
v-model:open="videoCandidatesOpen"
title="视频候选管理"
description="完成质量检查后,可以将通过的候选设为主视频。"
:width="videoCandidatesWidth"
>
<div v-if="videoCandidatesOpen && videoCandidates.length" class="asset-candidate-grid mt-4">
<VideoCard
v-for="item in videoCandidates"
:key="item.id"
:item="item"
:shot-no="shot.shotNo"
:duration-seconds="shot.durationSeconds"
:stale="false"
:blocked="assetBlocked"
:validation-passed="sessionVideoValidation(projectId, item.shotId, item.id)?.passed ?? null"
:recorded-validation-passed="videoRecordedValidation(videoQualityStatus, item.shotId, item.id)"
:confirming="confirmingVideo === item.id"
@quality="openQuality('video', item.id)"
@history="openVideoHistory(item.id)"
@select="confirmingVideo = item.id"
@confirm="setPrimaryVideo"
@cancel="confirmingVideo = ''"
/>
</div>
<p v-else class="text-xs text-muted">暂无其它视频候选。</p>
</AppDialog>
<!-- 以下是指定视频质量记录弹窗模块,打开后直接展示结果与修改建议 -->
<AppDialog
v-model:open="videoHistoryOpen"
title="视频质量记录"
description="查看此视频已有的画面检查结果与本镜头的相关记录,不收费。"
wide
>
<VideoQualityDiagnostics
v-if="videoHistoryOpen && videoHistoryId"
:key="`${shot.shotId}:${videoHistoryId}`"
:shot-id="shot.shotId"
:video-id="videoHistoryId"
:stale="videoHistoryStale"
/>
</AppDialog>
<AppDialog
v-model:open="historyOpen"
title="首帧校验历史"
@@ -932,29 +936,24 @@ async function inspectSpecs() {
.production-stage-actions {
@apply mt-4 flex min-h-[34px] flex-wrap items-center gap-3;
}
.keyframe-grid {
@apply grid gap-3;
grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
/* 主首帧与主视频共用 260px 宽度,画面保持正方形,小屏下不超过可用空间。 */
.keyframe-grid,
.video-grid {
@apply grid w-full max-w-[260px] grid-cols-1 gap-3;
}
/* 候选画面固定 260px,最多五列;列数减少时仍保持左右边缘对齐。 */
.asset-candidate-grid {
@apply grid w-full max-w-[1348px] items-start gap-3;
grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 260px));
justify-content: space-between;
}
.keyframe-card {
@apply relative overflow-hidden rounded-none bg-(--app-subtle);
@apply min-w-0 overflow-hidden rounded-none bg-(--app-subtle);
}
.keyframe-card .asset-image {
@apply aspect-square rounded-none;
}
.keyframe-image {
@apply relative;
}
.primary-keyframe-mark {
@apply absolute top-2 left-2 z-1 flex size-7 items-center justify-center;
color: var(--app-on-accent);
background: var(--app-button-primary);
box-shadow:
0 0 0 1px rgb(0 0 0 / 55%),
0 2px 8px rgb(0 0 0 / 35%);
}
.video-input-grid,
.video-grid {
.video-input-grid {
@apply grid gap-3;
grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
}
@@ -970,12 +969,6 @@ async function inspectSpecs() {
.video-input-image .asset-image {
@apply h-full w-full aspect-auto;
}
.video-record {
@apply min-w-0 overflow-hidden rounded-none bg-(--app-subtle);
}
.production-video {
@apply block w-full aspect-square bg-[#080808] object-contain;
}
.generation-settings-panel {
@apply p-5;
}
@@ -989,9 +982,16 @@ async function inspectSpecs() {
@apply mb-[7px] text-xs font-medium leading-5;
}
@media (max-width: 760px) {
/* 手机画面占满内容宽度,图片与视频的高度继续由正方形比例确定。 */
.keyframe-grid,
.video-input-grid,
.video-grid {
@apply max-w-none;
}
/* 手机候选按整行展示,避免固定 260px 造成侧边留白。 */
.asset-candidate-grid {
@apply max-w-none grid-cols-[minmax(0,_1fr)];
}
.video-input-grid {
@apply grid-cols-[repeat(2,_minmax(0,_1fr))];
}
.generation-settings-panel {