From ed786b2db68ccaba88d132bc8b87b82eb93c85f4 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 3 Jul 2024 22:04:59 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91image=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=87=8D=E6=96=B0=E7=94=9F=E6=88=90=E6=93=8D?= =?UTF-8?q?=E4=BD=9C(=E5=80=BC=E5=B7=B2=E7=BB=8F=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=88=87=E6=8D=A2=EF=BC=8C=E8=BF=98=E4=B8=8D=E8=83=BD=E5=AE=8C?= =?UTF-8?q?=E5=85=A8=E5=A1=AB=E5=85=85=E5=80=BC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ai/image/ImageTask.vue | 7 ++++ src/views/ai/image/ImageTaskCard.vue | 8 ++++- src/views/ai/image/dall3/index.vue | 9 ++++- src/views/ai/image/index.vue | 36 +++++++++++++++++-- src/views/ai/image/midjourney/index.vue | 10 +++++- src/views/ai/image/stable-diffusion/index.vue | 10 +++++- 6 files changed, 74 insertions(+), 6 deletions(-) diff --git a/src/views/ai/image/ImageTask.vue b/src/views/ai/image/ImageTask.vue index 36eb4595..9ddd7461 100644 --- a/src/views/ai/image/ImageTask.vue +++ b/src/views/ai/image/ImageTask.vue @@ -130,6 +130,10 @@ const handlerImageBtnClick = async (type: string, imageDetail: ImageVO) => { message.success('删除成功!') } else if (type === 'download') { await downloadImage(imageDetail.picUrl) + } else if (type === 'regeneration') { + // Midjourney 平台 + console.log('regeneration', imageDetail.id) + await emits('onRegeneration', imageDetail) } } @@ -175,6 +179,9 @@ const handlerPageChange = async (page) => { /** 暴露组件方法 */ defineExpose({ getImageList }) +// emits +const emits = defineEmits(['onRegeneration']) + /** 组件挂在的时候 */ onMounted(async () => { // 获取 image 列表 diff --git a/src/views/ai/image/ImageTaskCard.vue b/src/views/ai/image/ImageTaskCard.vue index 62ba222e..4f8525f6 100644 --- a/src/views/ai/image/ImageTaskCard.vue +++ b/src/views/ai/image/ImageTaskCard.vue @@ -25,6 +25,12 @@ :icon="Download" @click="handlerBtnClick('download', imageDetail)" /> +