fix(short-drama-agent-front): 统一全屏布局与问题处理交互

This commit is contained in:
GJ committed 2026-10-17 17:40:39 +08:00
1 parent db91a4b871
commit cc27d463e0
25 files changed
+838 -316

No files matched your search

@@ -1,5 +1,6 @@
<script setup lang="ts">
import ContextNotice from '../../../components/ui/ContextNotice.vue'
import WorkspaceSectionHeading from '../../../components/ui/WorkspaceSectionHeading.vue'
import { computed, onScopeDispose, ref, watch } from 'vue'
import { NButton, NFormItem, NSelect, NSpin } from 'naive-ui'
@@ -249,8 +250,8 @@ onScopeDispose(() => {
</script>
<template>
<!-- 以下是项目画布与图片、视频模型配置模块 -->
<section class="production-tool-section creative-profile-settings workspace-panel">
<!-- 以下是平铺的项目画布与模型配置模块,使用留白分组而不叠加背景面板 -->
<section class="production-tool-section creative-profile-settings">
<h3 v-if="!hideActions" class="text-sm font-semibold">项目画布与生成模型</h3>
<NSpin :show="loading">
<ContextNotice v-if="disabled" type="info" :show-icon="false" class="mb-3"
@@ -269,18 +270,28 @@ onScopeDispose(() => {
当前没有可用的完整图片和视频模型,暂时无法保存项目生成配置。
</ContextNotice>
<div v-if="profile" class="creative-profile-grid">
<NFormItem label="作品宽高比">
<NSelect
:value="profile.aspectRatio"
:options="aspectRatios"
:disabled="saving || disabled"
@update:value="profile.aspectRatio = $event as CreativeProfileAspectRatio"
<!-- 以下是独占一行的画布设置,与下方两个模型分组共用边界 -->
<section class="creative-profile-canvas space-y-4">
<WorkspaceSectionHeading
title="画布设置"
description="设置作品画面比例,后续制作使用已保存的项目画布。"
/>
</NFormItem>
<div></div>
<NFormItem label="作品宽高比">
<NSelect
:value="profile.aspectRatio"
:options="aspectRatios"
:disabled="saving || disabled"
@update:value="profile.aspectRatio = $event as CreativeProfileAspectRatio"
/>
</NFormItem>
</section>
<!-- 以下是项目图片生成配置模块 -->
<section class="model-section min-w-0 pt-5">
<h3 class="mb-4 text-sm font-semibold">图片配置</h3>
<section class="model-section min-w-0">
<WorkspaceSectionHeading
class="mb-4"
title="图片配置"
description="选择图片模型和默认生成参数,后续图片制作将继承此配置。"
/>
<NFormItem label="图片模型">
<NSelect
:value="imageSelection"
@@ -296,8 +307,12 @@ onScopeDispose(() => {
/>
</section>
<!-- 以下是项目视频生成配置模块 -->
<section class="model-section min-w-0 pt-5">
<h3 class="mb-4 text-sm font-semibold">视频配置</h3>
<section class="model-section min-w-0">
<WorkspaceSectionHeading
class="mb-4"
title="视频配置"
description="选择视频模型和默认生成参数,后续视频制作将继承此配置。"
/>
<NFormItem label="视频模型">
<NSelect
:value="videoSelection"
@@ -324,27 +339,30 @@ onScopeDispose(() => {
<style scoped>
@reference "../../../styles/styles.css";
.creative-profile-grid {
@apply grid grid-cols-[repeat(2,_minmax(0,_1fr))] items-start gap-x-5 gap-y-6;
@apply grid grid-cols-[repeat(2,_minmax(0,_1fr))] items-start gap-x-10 gap-y-6;
}
/* 画布设置铺满一行,图片与视频在宽屏并排、窄屏依次显示。 */
.creative-profile-canvas {
grid-column: 1 / -1;
}
.model-section > :deep(.n-form-item) {
@apply mb-6;
}
.creative-profile-grid > :deep(.n-form-item--top-labelled),
.model-section > :deep(.n-form-item--top-labelled) {
/* 模块首字段与动态参数字段使用相同的标签和控件行高。 */
.creative-profile-grid :deep(.n-form-item--top-labelled) {
grid-template-rows: minmax(var(--n-label-height), auto) auto auto;
}
.creative-profile-grid > :deep(.n-form-item-label),
.model-section > :deep(.n-form-item-label) {
.creative-profile-grid :deep(.n-form-item-label) {
min-height: 30px;
padding: 0 0 8px;
}
.creative-profile-grid > :deep(.n-form-item-blank),
.model-section > :deep(.n-form-item-blank) {
.creative-profile-grid :deep(.n-form-item-blank) {
min-height: 34px;
align-items: center;
}
.creative-profile-settings {
@apply m-0;
/* 与质量规则页的首模块保持相同的顶部留白。 */
@apply m-0 pt-5;
}
.creative-profile-settings > h3 {
@apply mb-4;
@@ -356,8 +374,5 @@ onScopeDispose(() => {
.creative-profile-grid {
@apply grid-cols-[minmax(0,_1fr)];
}
.creative-profile-grid > div:empty {
@apply hidden;
}
}
</style>