refactor: 生成弹窗操作按钮移入固定底部区域
This commit is contained in:
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 open = defineModel<boolean>('open', { default: false })
|
||||||
const emit = defineEmits<{ generate: [input: GenerateCastingCandidateInput] }>()
|
const emit = defineEmits<{ generate: [input: GenerateCastingCandidateInput] }>()
|
||||||
|
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>({})
|
||||||
@@ -61,6 +62,7 @@ const formModel = computed(() => ({ prompt: prompt.value }))
|
|||||||
<template>
|
<template>
|
||||||
<AppDialog v-model:open="open" title="生成角色选角候选" :description="`${subjectName} · 候选不会自动成为身份母版`">
|
<AppDialog v-model:open="open" title="生成角色选角候选" :description="`${subjectName} · 候选不会自动成为身份母版`">
|
||||||
<AppForm
|
<AppForm
|
||||||
|
ref="formRef"
|
||||||
:model="formModel"
|
:model="formModel"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:reset-key="`${open}:${subjectId}`"
|
:reset-key="`${open}:${subjectId}`"
|
||||||
@@ -106,17 +108,17 @@ const formModel = computed(() => ({ prompt: prompt.value }))
|
|||||||
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 || !valid || !acknowledged"
|
:disabled="disabled || !valid || !acknowledged"
|
||||||
:loading="disabled"
|
:loading="disabled"
|
||||||
type="primary"
|
type="primary"
|
||||||
attr-type="submit"
|
@click="formRef?.validate(submit)"
|
||||||
>
|
>
|
||||||
{{ disabled ? '生成中…' : '确认生成候选' }}
|
{{ disabled ? '生成中…' : '确认生成候选' }}
|
||||||
</NButton>
|
</NButton>
|
||||||
</div>
|
</template>
|
||||||
</AppForm>
|
|
||||||
</AppDialog>
|
</AppDialog>
|
||||||
</template>
|
</template>
|
||||||
Reference in new issue
Block a user