From 38c485b2bccc7a4d431d01bd116c8c57a4304dc1 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 10 Aug 2024 19:07:24 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E3=80=91AI=20=E5=A4=A7=E6=A8=A1=E5=9E=8B=EF=BC=9A=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=80=9D=E7=BB=B4=E5=AF=BC=E5=9B=BE=E7=9A=84=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ai/mindmap/manager/index.vue | 30 +++++++++----------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/src/views/ai/mindmap/manager/index.vue b/src/views/ai/mindmap/manager/index.vue index 210986b2..008a2e9b 100644 --- a/src/views/ai/mindmap/manager/index.vue +++ b/src/views/ai/mindmap/manager/index.vue @@ -94,16 +94,9 @@ - + { } /** 预览操作按钮 */ -const previewVisible = ref(false) +const previewVisible = ref(false) // drawer 的显示隐藏 +const previewVisible2 = ref(false) // right 的显示隐藏 const previewContent = ref('') -const openPreview = (row: MindMapVO) => { - previewContent.value = row.generatedContent +const openPreview = async (row: MindMapVO) => { + previewVisible2.value = false previewVisible.value = true -} - -const drawerOpened = ref(false) // drawer组件是否完全展开 -const openedHandler = () => { // drawer完全打开时再渲染预览组件 - drawerOpened.value = true -} -const closeHandler = () => { // drawer关闭时回调,更改一下drawerOpened的值为false - drawerOpened.value = false + // 在 drawer 渲染完后,再渲染 right 预览,不然会报错,需要保证 width 宽度先出来 + await nextTick() + previewVisible2.value = true + previewContent.value = row.generatedContent } /** 初始化 **/