From 85f2e26ff5d6cf02d02df69ff519b9eb17dbf66e Mon Sep 17 00:00:00 2001 From: lizw-2015 <1183409807@qq.com> Date: Wed, 9 Jul 2025 14:26:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(editor,=20taskManagement):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=B0=8F=E5=87=AF=20AI=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 ModelMain.vue 中添加小凯 AI 的 iframe - 创建 automatedPresentation.vue并添加小凯 AI 的 iframe - 在 automatedPresentation.vue 中添加消息监听器 --- src/editor/ModelMain.vue | 2 +- src/views/taskManagement/automatedPresentation.vue | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/editor/ModelMain.vue b/src/editor/ModelMain.vue index ac4db7e..3033520 100644 --- a/src/editor/ModelMain.vue +++ b/src/editor/ModelMain.vue @@ -72,7 +72,7 @@ - + diff --git a/src/views/taskManagement/automatedPresentation.vue b/src/views/taskManagement/automatedPresentation.vue index b7da511..6674f42 100644 --- a/src/views/taskManagement/automatedPresentation.vue +++ b/src/views/taskManagement/automatedPresentation.vue @@ -1,12 +1,21 @@ - From 43decc46c77a569d2ccc5e2c0f5c3b51489a3115 Mon Sep 17 00:00:00 2001 From: lizw-2015 <1183409807@qq.com> Date: Wed, 9 Jul 2025 14:33:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat(editor):=20=E6=B7=BB=E5=8A=A0=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E6=B6=88=E6=81=AF=E7=9B=91=E5=90=AC=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 ModelMain 组件中添加了 window message 事件监听器 - 监听函数为 this.mes,用于处理接收到的消息 - 在组件卸载时移除消息监听器,避免内存泄漏 --- src/editor/ModelMain.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/editor/ModelMain.vue b/src/editor/ModelMain.vue index 3033520..419115e 100644 --- a/src/editor/ModelMain.vue +++ b/src/editor/ModelMain.vue @@ -175,9 +175,12 @@ export default { } this.editorHash += 1 // 刷新编辑器 }) + + window.addEventListener('message', this.mes) }, unmounted() { ModelMainUnmounted() + window.removeEventListener('message', this.mes) }, data() { return { @@ -253,6 +256,9 @@ export default { methods: { renderIcon, getWidgetBySide, + mes(event) { + console.log('data', event.data); + }, toHome() { system.router.push({ name: 'home' }) },