From 776317083057b923fd4000edc5915201e24216c1 Mon Sep 17 00:00:00 2001 From: GouJ Date: Tue, 22 Sep 2026 19:03:29 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E7=BB=9F=E4=B8=80=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E6=93=8D=E4=BD=9C=E5=B7=A6=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/CreativeProfileSettings.vue | 2 +- .../components/IdentityEditor.vue | 8 ++++---- .../visual-style/components/StyleEditor.vue | 4 ++-- src/styles/styles.css | 8 ++++++++ tests/components/ui/flatTheme.test.ts | 15 +++++++++++++++ 5 files changed, 30 insertions(+), 7 deletions(-) diff --git a/src/features/generation-config/components/CreativeProfileSettings.vue b/src/features/generation-config/components/CreativeProfileSettings.vue index d3ddd89..922dbdf 100644 --- a/src/features/generation-config/components/CreativeProfileSettings.vue +++ b/src/features/generation-config/components/CreativeProfileSettings.vue @@ -220,7 +220,7 @@ onScopeDispose(() => controller?.abort()) /> -
+
() const emit = defineEmits<{ save: [input: SaveIdentityInput]; dirty: [value: boolean] }>() const form = reactive({ description: '', generationPrompt: '', isLocked: false }) @@ -88,11 +88,11 @@ function save() { class="flex items-start gap-2 text-xs leading-6" >{{ module === 'character' ? '确认并锁定演员身份' : '确认并锁定身份文本' }} -
+
+ 保存主体身份 {{ dirty ? '有未保存修改,刷新不会覆盖草稿。' : '图片以已保存的身份提示词为准。' - }}保存主体身份 + }}
diff --git a/src/features/visual-style/components/StyleEditor.vue b/src/features/visual-style/components/StyleEditor.vue index 1c9f953..4187b0b 100644 --- a/src/features/visual-style/components/StyleEditor.vue +++ b/src/features/visual-style/components/StyleEditor.vue @@ -7,7 +7,7 @@ import { NButton, NCheckbox, NInput, NTag } from 'naive-ui' import { computed, reactive, ref, watch } from 'vue' import type { SaveVisualStyleInput, VisualStyle } from '../types' -/** 编辑草稿独立于查询结果,刷新不会覆盖尚未保存的输入。 */ +/** 编辑草稿独立于轮询结果,刷新不会覆盖尚未保存的输入。 */ const props = defineProps<{ visualStyle: VisualStyle | null; disabled: boolean }>() const emit = defineEmits<{ save: [input: SaveVisualStyleInput]; dirty: [value: boolean] }>() const form = reactive({ @@ -145,7 +145,7 @@ const constraintsDetails = ref | null>(nul

锁定后仍可人工编辑并保存。取消勾选并保存后,才能再次使用 AI 重生成。

-
+
保存视觉风格
diff --git a/src/styles/styles.css b/src/styles/styles.css index f504062..df5015b 100644 --- a/src/styles/styles.css +++ b/src/styles/styles.css @@ -182,6 +182,14 @@ gap: 10px; padding-top: 20px; } + /* 页面级表单的保存/执行操作从左侧开始,说明文字紧随其后;弹窗底部仍保持右对齐。 */ + .page-form-actions { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: flex-start; + gap: 8px 16px; + } .field-label { display: block; margin-bottom: 9px; diff --git a/tests/components/ui/flatTheme.test.ts b/tests/components/ui/flatTheme.test.ts index 2a71873..29dfda5 100644 --- a/tests/components/ui/flatTheme.test.ts +++ b/tests/components/ui/flatTheme.test.ts @@ -29,6 +29,21 @@ afterEach(() => { }) describe('全站平面主题', () => { + it('页面级表单操作统一左对齐,弹窗操作仍保持右对齐', () => { + const css = readAllStyles() + expect(css).toMatch( + /\.page-form-actions\s*\{[^}]*display:\s*flex;[^}]*flex-wrap:\s*wrap;[^}]*align-items:\s*center;[^}]*justify-content:\s*flex-start;[^}]*gap:\s*8px 16px;/ + ) + expect(css).toMatch(/\.dialog-footer\s*\{[^}]*justify-content:\s*flex-end;/) + for (const file of [ + 'src/features/subject-identity/components/IdentityEditor.vue', + 'src/features/visual-style/components/StyleEditor.vue', + 'src/features/generation-config/components/CreativeProfileSettings.vue' + ]) { + expect(readFileSync(file, 'utf8')).toContain('page-form-actions') + } + }) + it.each([false, true])('模式 %s 的绿色按钮使用白字,禁用后灰底灰字且不可提交', dark => { localStorage.setItem('drama-studio-theme', dark ? 'dark' : 'light') vi.stubGlobal('matchMedia', () => ({ matches: dark, addEventListener() {}, removeEventListener() {} }))