fix: 思维导图管理预览会报错

pull/493/head
hhhero 2024-08-10 18:41:21 +08:00
parent b2bdcdcf9c
commit 5f970864a1
1 changed files with 16 additions and 2 deletions

View File

@ -94,9 +94,16 @@
</ContentWrap>
<!-- 思维导图的预览 -->
<el-drawer v-model="previewVisible" :with-header="false" size="800px">
<el-drawer
v-model="previewVisible"
:with-header="false"
size="800px"
@opened="openedHandler"
@close="closeHandler"
>
<Right
ref="rightRef"
v-if="drawerOpened"
:generatedContent="previewContent"
:isEnd="true"
:isGenerating="false"
@ -167,7 +174,6 @@ const handleDelete = async (id: number) => {
} catch {}
}
// TODO
/** 预览操作按钮 */
const previewVisible = ref(false)
const previewContent = ref('')
@ -176,6 +182,14 @@ const openPreview = (row: MindMapVO) => {
previewVisible.value = true
}
const drawerOpened = ref(false) // drawer
const openedHandler = () => { // drawer
drawerOpened.value = true
}
const closeHandler = () => { // drawerdrawerOpenedfalse
drawerOpened.value = false
}
/** 初始化 **/
onMounted(async () => {
getList()