refactor: 生成弹窗操作按钮移入固定底部区域
This commit is contained in:
1 parent
afe394347d
commit
c493d9338c
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: [input: GenerateKeyframeInput] }>()
|
const emit = defineEmits<{ generate: [input: GenerateKeyframeInput] }>()
|
||||||
|
const formRef = ref<InstanceType<typeof AppForm> | null>(null)
|
||||||
const confirmed = ref(false)
|
const confirmed = ref(false)
|
||||||
const preview = ref<KeyframeGenerationPreview | null>(null)
|
const preview = ref<KeyframeGenerationPreview | null>(null)
|
||||||
const previewError = ref('')
|
const previewError = ref('')
|
||||||
@@ -95,6 +96,7 @@ async function loadPreview() {
|
|||||||
description="新图先作为候选;完成质量检查并通过后,才能设为主首帧。"
|
description="新图先作为候选;完成质量检查并通过后,才能设为主首帧。"
|
||||||
>
|
>
|
||||||
<AppForm
|
<AppForm
|
||||||
|
ref="formRef"
|
||||||
:model="imageGenerationOptions"
|
:model="imageGenerationOptions"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:reset-key="`${open}:${shotId}`"
|
:reset-key="`${open}:${shotId}`"
|
||||||
@@ -171,10 +173,10 @@ async function loadPreview() {
|
|||||||
class="mt-5 flex items-start gap-3 text-sm leading-6"
|
class="mt-5 flex items-start gap-3 text-sm leading-6"
|
||||||
>我已确认调用图片模型可能产生费用,且当前没有相同镜头的生图任务。
|
>我已确认调用图片模型可能产生费用,且当前没有相同镜头的生图任务。
|
||||||
</NCheckbox>
|
</NCheckbox>
|
||||||
<div class="dialog-footer">
|
</AppForm>
|
||||||
|
<template #footer>
|
||||||
<NButton @click="open = false">取消</NButton>
|
<NButton @click="open = false">取消</NButton>
|
||||||
<NButton :disabled="disabled || !confirmed" attr-type="submit" type="primary">确认生成首帧</NButton>
|
<NButton :disabled="disabled || !confirmed" @click="formRef?.validate(submit)" type="primary">确认生成首帧</NButton>
|
||||||
</div>
|
</template>
|
||||||
</AppForm>
|
|
||||||
</AppDialog>
|
</AppDialog>
|
||||||
</template>
|
</template>
|
||||||
Reference in new issue
Block a user