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

This commit is contained in:
GouJ committed 2026-09-26 23:14:23 +08:00
1 parent e7fb0dc652
commit afe394347d
1 file changed
+6 -4
@@ -20,6 +20,7 @@ const props = defineProps<{
}>() }>()
const open = defineModel<boolean>('open', { default: false }) const open = defineModel<boolean>('open', { default: false })
const emit = defineEmits<{ generate: [formId: string, input: GenerateFormImageInput] }>() const emit = defineEmits<{ generate: [formId: string, input: GenerateFormImageInput] }>()
const formRef = ref<InstanceType<typeof AppForm> | null>(null)
const prompt = ref('') const prompt = ref('')
const provider = ref('') const provider = ref('')
const generationOptions = ref<GenerationOptions>({}) const generationOptions = ref<GenerationOptions>({})
@@ -93,6 +94,7 @@ const rules = {}
:description="`${form?.subject.name || ''} · ${form?.name || ''}`" :description="`${form?.subject.name || ''} · ${form?.name || ''}`"
> >
<AppForm <AppForm
ref="formRef"
:model="formModel" :model="formModel"
:rules="rules" :rules="rules"
:disabled="disabled" :disabled="disabled"
@@ -185,16 +187,16 @@ const rules = {}
class="flex items-start gap-2 text-xs leading-6" class="flex items-start gap-2 text-xs leading-6"
>我已确认后台没有同项目的生成任务,了解本次会调用模型并产生费用。</NCheckbox >我已确认后台没有同项目的生成任务,了解本次会调用模型并产生费用。</NCheckbox
> >
<div class="dialog-footer"> </AppForm>
<template #footer>
<NButton @click="open = false">取消</NButton <NButton @click="open = false">取消</NButton
><NButton ><NButton
:disabled="disabled || !form || !provider || !acknowledged" :disabled="disabled || !form || !provider || !acknowledged"
type="primary" type="primary"
attr-type="submit" @click="formRef?.validate(submit)"
> >
确认生成图片 确认生成图片
</NButton> </NButton>
</div> </template>
</AppForm>
</AppDialog> </AppDialog>
</template> </template>