+
保存视觉风格
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() {} }))