From 771bc6391cbe9e8a80cd5d0933a65aee9bab34e6 Mon Sep 17 00:00:00 2001 From: zoujing Date: Sat, 13 Jun 2026 13:15:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20aigc=E7=BB=84=E4=BB=B6=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=93=E6=9E=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GeneratorPhotoComponent/index.vue | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/pages/ChatModule/GeneratorPhotoComponent/index.vue b/src/pages/ChatModule/GeneratorPhotoComponent/index.vue index a87b129..bd3cdf9 100644 --- a/src/pages/ChatModule/GeneratorPhotoComponent/index.vue +++ b/src/pages/ChatModule/GeneratorPhotoComponent/index.vue @@ -4,24 +4,24 @@ - + - {{ props.toolCall.componentNameParams.superscript }} + {{ componentDataMap.superscript }} - + - {{ props.toolCall.componentNameParams.description }} + {{ componentDataMap.description }} - {{ props.toolCall.componentNameParams.buttonName }} + {{ componentDataMap.buttonName }} @@ -46,6 +46,17 @@ const props = defineProps({ }, }); +const componentDataMap = computed(() => { + return { + background: props.toolCall.componentNameParams?.background || props.toolCall.aigc?.background, + title: props.toolCall.componentNameParams?.title || props.toolCall.aigc?.title, + description: props.toolCall.componentNameParams?.description || props.toolCall.aigc?.description, + buttonName: props.toolCall.componentNameParams?.buttonName || props.toolCall.aigc?.buttonName, + superscript: props.toolCall.componentNameParams?.superscript || props.toolCall.aigc?.superscript, + jumpUrl: props.toolCall.componentNameParams?.jumpUrl || props.toolCall.aigc?.jumpUrl, + } +}) + onMounted(() => { nextTick(() => { setTimeout(() => { @@ -56,8 +67,8 @@ onMounted(() => { const jumpClick = () => { const token = getAccessToken(); - if (props.toolCall.componentNameParams.jumpUrl) { - navigateTo(props.toolCall.componentNameParams.jumpUrl, { token: token }); + if (componentDataMap.jumpUrl) { + navigateTo(componentDataMap.jumpUrl, { token: token }); } };