feat: 增加操作步骤引导与错误修复入口

This commit is contained in:
GouJ committed 2026-09-22 21:40:58 +08:00
1 parent be06caaa9f
commit 1c5b1e448a
8 files changed
+374 -122

No files matched your search

@@ -1,7 +1,6 @@
<script setup lang="ts">
import AppForm from '../../../components/ui/AppForm.vue'
import { NFormItem } from 'naive-ui'
import DetailDisclosure from '../../../components/ui/DetailDisclosure.vue'
import { NButton, NCheckbox, NInput } from 'naive-ui'
import { computed, reactive, ref, watch } from 'vue'
import type { SaveIdentityInput, SubjectIdentity } from '../types'
@@ -36,63 +35,42 @@ function save() {
<template>
<AppForm :model="form" :disabled="disabled" class="mt-5" @submit="save">
<fieldset :disabled="disabled" class="space-y-4">
<NFormItem
class="block"
path="description"
label="稳定身份描述"
:label-props="{ for: 'identity-description' }"
<NFormItem class="block" path="description" label="身份描述" :label-props="{ for: 'identity-description' }"
><NInput
:disabled="disabled"
placeholder="只描述跨形态不变的面部、结构、材质等特征"
:input-props="{ id: 'identity-description' }"
class="min-h-28"
class="min-h-20"
v-model:value="form.description"
type="textarea"
:autosize="{ minRows: 3, maxRows: 12 }"
:autosize="{ minRows: 2, maxRows: 8 }"
></NInput>
</NFormItem>
<NFormItem
class="block"
path="generationPrompt"
label="身份核心提示词(稳定事实)"
label="核心提示词"
:label-props="{ for: 'identity-prompt' }"
><NInput
:disabled="disabled"
placeholder="不固定某一形态的服装、伤势或临时状态"
:input-props="{ id: 'identity-prompt' }"
class="min-h-36"
class="min-h-24"
v-model:value="form.generationPrompt"
type="textarea"
:autosize="{ minRows: 3, maxRows: 12 }"
:autosize="{ minRows: 2, maxRows: 8 }"
></NInput>
</NFormItem>
<DetailDisclosure title="身份填写与锁定规则"
><p class="text-xs leading-6 text-muted">
{{
module === 'prop'
? '保留道具固定文字、编号、部件位置、结构与材质组合;不要泛化原有辨识细节,也不要写临时损伤或摆放状态。'
: module === 'scene'
? '保留建筑骨架、入口、窗户、楼梯与固定布局,不写临时天气、人群或灯光。'
: '保留有依据的五官、骨相、发际线与体型,不固定某套服装、临时表情或伤势。'
}}
这里保存身份事实;背景、视角和参考图约束由后端另行编译,不是最终整段生图 Prompt。
</p>
<p class="mt-2 text-xs text-muted">
人物需要同时确认母版并锁定身份,首帧才能就绪。锁定后仍可人工编辑、生成图片及切换母版。
</p></DetailDisclosure
>
<NCheckbox
:disabled="disabled"
id="identity-lock"
v-model:checked="form.isLocked"
class="flex items-start gap-2 text-xs leading-6"
>{{ module === 'character' ? '确认并锁定演员身份' : '确认并锁定身份文本' }}</NCheckbox
>{{ module === 'character' ? '锁定演员身份' : '锁定身份' }}</NCheckbox
>
<div class="page-form-actions">
<NButton :disabled="disabled" type="primary" attr-type="submit">保存主体身份</NButton>
<span class="text-xs text-muted">{{
dirty ? '有未保存修改,刷新不会覆盖草稿。' : '图片以已保存的身份提示词为准。'
}}</span>
<span v-if="dirty" class="text-xs text-muted">有未保存修改</span>
</div>
</fieldset>
</AppForm>
@@ -52,12 +52,6 @@ function chooseAnchor() {
<h3 class="text-sm font-medium">身份参考图 · {{ images.length }}</h3>
<NTag size="small" :bordered="false">{{ anchor ? '已选母版' : '尚无母版' }}</NTag>
</div>
<p class="mt-2 text-xs leading-6 text-muted">
身份母版确定“是谁”;形态主图确定“该造型长什么样”。切换母版仅影响之后的生成,不会替换已有形态图、分镜参考图或提示词。
</p>
<NAlert v-if="character && anchor" type="info" :show-icon="false" class="mt-3 text-xs leading-6">
如果要更换演员身份,请生成新的“选角候选”并确认选角。正面、三分之四、全身等辅助身份图会继续引用当前母版,只用于保持同一演员,不会重新选择人物。
</NAlert>
<template v-if="selected">
<AssetImage
:key="selected.id"
@@ -70,7 +64,6 @@ function chooseAnchor() {
/>
<div class="image-history-heading">
<h4 class="font-medium">历史记录 · {{ images.length }} 条</h4>
<span class="text-muted">点击缩略图切换预览,可横向滚动</span>
</div>
<NScrollbar
x-scrollable
@@ -158,7 +151,6 @@ function chooseAnchor() {
><NButton @click="confirming = false" text size="small">取消</NButton>
</div></NAlert
>
<p class="mt-2 break-all font-mono text-[10px] text-muted">Identity image ID · {{ selected.id }}</p>
</template>
<p v-else class="py-8 text-sm text-muted">尚无身份参考图。先保存身份提示词,再生成第一张母版。</p>
</section>