style: 统一页面表单操作左对齐
This commit is contained in:
1 parent
869ebf2f2c
commit
7763170830
5 files changed
+30
-7
No files matched your search
@@ -220,7 +220,7 @@ onScopeDispose(() => controller?.abort())
|
||||
/>
|
||||
</section>
|
||||
</div>
|
||||
<div class="mt-3 flex items-center gap-3">
|
||||
<div class="page-form-actions mt-4">
|
||||
<NButton
|
||||
type="primary"
|
||||
:loading="saving"
|
||||
|
||||
@@ -6,7 +6,7 @@ import { NButton, NCheckbox, NInput } from 'naive-ui'
|
||||
import { computed, reactive, ref, watch } from 'vue'
|
||||
import type { SaveIdentityInput, SubjectIdentity } from '../types'
|
||||
|
||||
/** 身份文本草稿不随查询覆盖;父页面切换主体或保存成功后重建编辑器。 */
|
||||
/** 身份文本草稿不随轮询覆盖;父页面切换主体或保存成功后重建编辑器。 */
|
||||
const props = defineProps<{ identity: SubjectIdentity | null; disabled: boolean; module: string }>()
|
||||
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' ? '确认并锁定演员身份' : '确认并锁定身份文本' }}</NCheckbox
|
||||
>
|
||||
<div class="flex flex-wrap items-center justify-between gap-3">
|
||||
<div class="page-form-actions">
|
||||
<NButton :disabled="disabled" type="primary" attr-type="submit">保存主体身份</NButton>
|
||||
<span class="text-xs text-muted">{{
|
||||
dirty ? '有未保存修改,刷新不会覆盖草稿。' : '图片以已保存的身份提示词为准。'
|
||||
}}</span
|
||||
><NButton :disabled="disabled" type="primary" attr-type="submit">保存主体身份</NButton>
|
||||
}}</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
</AppForm>
|
||||
|
||||
@@ -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<InstanceType<typeof DetailDisclosure> | null>(nul
|
||||
<p class="text-xs leading-6 text-muted">
|
||||
锁定后仍可人工编辑并保存。取消勾选并保存后,才能再次使用 AI 重生成。
|
||||
</p>
|
||||
<div class="flex justify-end">
|
||||
<div class="page-form-actions">
|
||||
<NButton :disabled="disabled" type="primary" attr-type="submit"> 保存视觉风格 </NButton>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user