refactor: 生成弹窗操作按钮移入固定底部区域

This commit is contained in:
GouJ committed 2026-09-26 23:14:15 +08:00
1 parent dd4c4a48b0
commit a7e19045bb
1 file changed
+6 -4
@@ -21,6 +21,7 @@ const props = defineProps<{
}>()
const open = defineModel<boolean>('open', { default: false })
const emit = defineEmits<{ generate: [input: GenerateCastingCandidateInput] }>()
const formRef = ref<InstanceType<typeof AppForm> | null>(null)
const prompt = ref('')
const provider = ref('')
const generationOptions = ref<GenerationOptions>({})
@@ -61,6 +62,7 @@ const formModel = computed(() => ({ prompt: prompt.value }))
<template>
<AppDialog v-model:open="open" title="生成角色选角候选" :description="`${subjectName} · 候选不会自动成为身份母版`">
<AppForm
ref="formRef"
:model="formModel"
:disabled="disabled"
:reset-key="`${open}:${subjectId}`"
@@ -106,17 +108,17 @@ const formModel = computed(() => ({ prompt: prompt.value }))
class="flex items-start gap-2 text-xs leading-6"
>我已确认调用图片模型可能产生费用,且当前没有同项目生成任务。
</NCheckbox>
<div class="dialog-footer">
</AppForm>
<template #footer>
<NButton @click="open = false">取消</NButton>
<NButton
:disabled="disabled || !valid || !acknowledged"
:loading="disabled"
type="primary"
attr-type="submit"
@click="formRef?.validate(submit)"
>
{{ disabled ? '生成中…' : '确认生成候选' }}
</NButton>
</div>
</AppForm>
</template>
</AppDialog>
</template>