feat(short-drama-agent-front): 完善镜头定位与项目配置

This commit is contained in:
GJ committed 2026-10-08 19:45:26 +08:00
1 parent 470b52e26d
commit 5b134207b8
66 files changed
+2042 -984

No files matched your search

@@ -35,7 +35,8 @@ watch(
() => [open.value, props.form?.id],
() => {
prompt.value = ''
const selected = props.catalog.images.find(item => item.provider === props.profile.imageProvider && item.enabled) ??
const selected =
props.catalog.images.find(item => item.provider === props.profile.imageProvider && item.enabled) ??
props.catalog.images.find(item => item.enabled)
provider.value = selected?.provider ?? ''
generationOptions.value = {
@@ -43,7 +44,10 @@ watch(
...(selected?.provider === props.profile.imageProvider ? props.profile.imageOptions : {})
}
const sizeSchema = selected?.generationOptions.find(item => item.key === 'size')
if (sizeSchema?.options?.length && !sizeSchema.options.some(option => option.value === generationOptions.value.size)) {
if (
sizeSchema?.options?.length &&
!sizeSchema.options.some(option => option.value === generationOptions.value.size)
) {
generationOptions.value.size = selected?.defaults.size ?? sizeSchema.options[0]?.value ?? ''
}
acknowledged.value = false
@@ -189,14 +193,14 @@ const rules = {}
>
</AppForm>
<template #footer>
<NButton @click="open = false">取消</NButton
><NButton
:disabled="disabled || !form || !provider || !acknowledged"
type="primary"
@click="formRef?.validate(submit)"
>
确认生成图片
</NButton>
<NButton @click="open = false">取消</NButton
><NButton
:disabled="disabled || !form || !provider || !acknowledged"
type="primary"
@click="formRef?.validate(submit)"
>
确认生成图片
</NButton>
</template>
</AppDialog>
</template>