From 185a041962a35f64dc016cbd664751ca7a297ce8 Mon Sep 17 00:00:00 2001 From: "X1627315083@163.com" <1627315083@qq.com> Date: Fri, 27 Mar 2026 11:35:17 +0800 Subject: [PATCH 1/4] fix --- src/views/home/left-nav.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/views/home/left-nav.vue b/src/views/home/left-nav.vue index 97c4972..04c3abd 100644 --- a/src/views/home/left-nav.vue +++ b/src/views/home/left-nav.vue @@ -44,7 +44,7 @@ {{ item.name }} @@ -207,6 +207,12 @@ } }) } + const openPopover = (item: any) => { + list.value.forEach((item: any) => { + item.visible = false + }) + item.visible = !item.visible + } onMounted(() => { MyEvent.add('newTitle', replaceTitle) }) From 40c4b7f8ac6cbac852999c79ffce0af5d52d33ab Mon Sep 17 00:00:00 2001 From: zhangyahui Date: Fri, 27 Mar 2026 11:45:06 +0800 Subject: [PATCH 2/4] =?UTF-8?q?bugfix:=20=20=E5=88=87=E6=8D=A2=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E6=97=B6=E5=88=9D=E5=A7=8B=E5=8C=96=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/agent/index.vue | 1 + src/views/home/components/Input.vue | 31 +++++++++++++++++++---------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/views/home/agent/index.vue b/src/views/home/agent/index.vue index f7eaa08..fb54be7 100644 --- a/src/views/home/agent/index.vue +++ b/src/views/home/agent/index.vue @@ -124,6 +124,7 @@ projectStore.clearProject() if (newVal) { handleGetProjectInfoAndHistory() + MyEvent.emit('projectChange') } } ) diff --git a/src/views/home/components/Input.vue b/src/views/home/components/Input.vue index 2992da0..1149da5 100644 --- a/src/views/home/components/Input.vue +++ b/src/views/home/components/Input.vue @@ -494,12 +494,12 @@ editorRef.value?.addEventListener('input', removePlaceholderOnInput) } - const toogltReportTag = () => { + const toogltReportTag = (clear = false) => { stopTypewriter() // 移除标签时停止打字机效果 // 清理掉已被删除的标签引用(从 DOM 中移除的元素) reportTags.value = reportTags.value.filter((tag) => tag.parentNode !== null) - if (reportTags.value.length > 0) { + if (reportTags.value.length > 0 ) { // 移除所有标签及其关联的零宽空格 reportTags.value.forEach((tag) => { if ( @@ -722,14 +722,6 @@ }) }) - // 初始化编辑器高度 - onMounted(() => { - MyEvent.add('quote', handleQuote) - nextTick(() => { - autoResizeEditor() - }) - }) - const typeValue = ref('') const areaValue = ref('') const styleValue = ref('') @@ -826,8 +818,27 @@ if (hasQuoted) return quoteList.value[0] = url } + + const handleInitInput = () => { + inputValue.value = '' + uploadedImages.value = [] + quoteList.value = [] + toogltReportTag(true) + if (editorRef.value) { + editorRef.value.innerHTML = '' + } + } + + onMounted(() => { + MyEvent.add('quote', handleQuote) + MyEvent.add('projectChange', handleInitInput) + nextTick(() => { + autoResizeEditor() + }) + }) onUnmounted(() => { MyEvent.remove('quote', handleQuote) + MyEvent.remove('projectChange', handleInitInput) }) // 暴露方法给父组件 defineExpose({ From 780d3a3e70ab7f13e1692514913c04dd943907cf Mon Sep 17 00:00:00 2001 From: "X1627315083@163.com" <1627315083@qq.com> Date: Fri, 27 Mar 2026 11:50:13 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=9F=A5=E4=B8=8D=E5=88=B0=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=B0=B1=E8=B7=B3=E8=BD=AC=E5=88=9B=E5=BB=BA=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lang/en.ts | 3 ++- src/lang/zh-cn.ts | 3 ++- src/views/home/agent/index.vue | 10 +++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/lang/en.ts b/src/lang/en.ts index 291813d..b49ec3e 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -81,7 +81,8 @@ export default { userAgreement: 'User Agreement', privacyPolicy: 'Privacy Policy', view: 'View', - remainingNum: 'Remaining number of times to upload profile picture:' + remainingNum: 'Remaining number of times to upload profile picture:', + notFound: 'Project not found', }, Country: { unitedStates: 'United States', diff --git a/src/lang/zh-cn.ts b/src/lang/zh-cn.ts index 397ef81..2c9e030 100644 --- a/src/lang/zh-cn.ts +++ b/src/lang/zh-cn.ts @@ -82,7 +82,8 @@ export default { userAgreement: '用户协议', privacyPolicy: '隐私政策', view: '查看', - remainingNum: '剩余上传头像次数:' + remainingNum: '剩余上传头像次数:', + notFound: '项目不存在', }, Country: { unitedStates: '美国', diff --git a/src/views/home/agent/index.vue b/src/views/home/agent/index.vue index f7eaa08..9ac97bb 100644 --- a/src/views/home/agent/index.vue +++ b/src/views/home/agent/index.vue @@ -36,10 +36,13 @@ import { useProjectStore } from '@/stores' import { getProjectInfo } from '@/api/agent' import { clearNodeChat, getNodeAncestors } from '@/api/versitonTree' - import { useRoute } from 'vue-router' + import { useRoute, useRouter } from 'vue-router' import MyEvent from '@/utils/myEvent' + import { useI18n } from 'vue-i18n' const route = useRoute() + const router = useRouter() + const { t } = useI18n() const projectStore = useProjectStore() const previewRef = ref(null) @@ -90,6 +93,11 @@ const handleGetProjectInfoAndHistory = () => { handleOpenSketch() getProjectInfo({ id: route.params.id }).then((res) => { + if(!res) { + router.push({ name: 'mainInput' }) + ElMessage.warning(t('Home.notFound')) + return + } if (res) agentRef.value.setChatInfo(res) let data = res?.project || res if (data?.latestNodeId) data.nodeId = data.latestNodeId From c707416cc14c217291d6ea58645dc809672f4bfc Mon Sep 17 00:00:00 2001 From: "X1627315083@163.com" <1627315083@qq.com> Date: Fri, 27 Mar 2026 15:31:58 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=93=E5=BC=803d?= =?UTF-8?q?=E4=BC=9A=E5=87=BA=E7=8E=B0=E4=B8=8A=E6=AC=A13d=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Canvas/FlowCanvas/flow-canvas.vue | 2 +- src/components/Canvas/components/base-modal.vue | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Canvas/FlowCanvas/flow-canvas.vue b/src/components/Canvas/FlowCanvas/flow-canvas.vue index 3b11ab2..15972e8 100644 --- a/src/components/Canvas/FlowCanvas/flow-canvas.vue +++ b/src/components/Canvas/FlowCanvas/flow-canvas.vue @@ -62,7 +62,7 @@ - +