【功能新增】AI 大模型:支持思维导图的管理
parent
ab110f915c
commit
38c485b2bc
|
@ -94,16 +94,9 @@
|
|||
</ContentWrap>
|
||||
|
||||
<!-- 思维导图的预览 -->
|
||||
<el-drawer
|
||||
v-model="previewVisible"
|
||||
:with-header="false"
|
||||
size="800px"
|
||||
@opened="openedHandler"
|
||||
@close="closeHandler"
|
||||
>
|
||||
<el-drawer v-model="previewVisible" :with-header="false" size="800px">
|
||||
<Right
|
||||
ref="rightRef"
|
||||
v-if="drawerOpened"
|
||||
v-if="previewVisible2"
|
||||
:generatedContent="previewContent"
|
||||
:isEnd="true"
|
||||
:isGenerating="false"
|
||||
|
@ -175,19 +168,16 @@ const handleDelete = async (id: number) => {
|
|||
}
|
||||
|
||||
/** 预览操作按钮 */
|
||||
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
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
|
|
Loading…
Reference in New Issue