fix: 思维导图管理预览会报错
parent
b2bdcdcf9c
commit
5f970864a1
|
@ -94,9 +94,16 @@
|
||||||
</ContentWrap>
|
</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
|
<Right
|
||||||
ref="rightRef"
|
ref="rightRef"
|
||||||
|
v-if="drawerOpened"
|
||||||
:generatedContent="previewContent"
|
:generatedContent="previewContent"
|
||||||
:isEnd="true"
|
:isEnd="true"
|
||||||
:isGenerating="false"
|
:isGenerating="false"
|
||||||
|
@ -167,7 +174,6 @@ const handleDelete = async (id: number) => {
|
||||||
} catch {}
|
} catch {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO 芋艿:预览会报错
|
|
||||||
/** 预览操作按钮 */
|
/** 预览操作按钮 */
|
||||||
const previewVisible = ref(false)
|
const previewVisible = ref(false)
|
||||||
const previewContent = ref('')
|
const previewContent = ref('')
|
||||||
|
@ -176,6 +182,14 @@ const openPreview = (row: MindMapVO) => {
|
||||||
previewVisible.value = true
|
previewVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const drawerOpened = ref(false) // drawer组件是否完全展开
|
||||||
|
const openedHandler = () => { // drawer完全打开时再渲染预览组件
|
||||||
|
drawerOpened.value = true
|
||||||
|
}
|
||||||
|
const closeHandler = () => { // drawer关闭时回调,更改一下drawerOpened的值为false
|
||||||
|
drawerOpened.value = false
|
||||||
|
}
|
||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
getList()
|
getList()
|
||||||
|
|
Loading…
Reference in New Issue