21
This commit is contained in:
parent
198ac6db1d
commit
fb099d4ec4
|
|
@ -4,6 +4,7 @@
|
||||||
title="编辑单页"
|
title="编辑单页"
|
||||||
width="900px"
|
width="900px"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
|
:destroy-on-close="true"
|
||||||
@close="handleClose"
|
@close="handleClose"
|
||||||
>
|
>
|
||||||
<el-form
|
<el-form
|
||||||
|
|
@ -25,7 +26,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="内容" prop="content">
|
<el-form-item label="内容" prop="content">
|
||||||
<div class="editor-container">
|
<div v-if="dialogVisible" class="editor-container">
|
||||||
<Toolbar
|
<Toolbar
|
||||||
:editor="editorRef"
|
:editor="editorRef"
|
||||||
:defaultConfig="toolbarConfig"
|
:defaultConfig="toolbarConfig"
|
||||||
|
|
@ -186,13 +187,13 @@ const resetForm = () => {
|
||||||
|
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
dialogVisible.value = false
|
// 先销毁编辑器实例
|
||||||
resetForm()
|
|
||||||
// 销毁编辑器实例
|
|
||||||
if (editorRef.value) {
|
if (editorRef.value) {
|
||||||
editorRef.value.destroy()
|
editorRef.value.destroy()
|
||||||
editorRef.value = undefined
|
editorRef.value = undefined
|
||||||
}
|
}
|
||||||
|
dialogVisible.value = false
|
||||||
|
resetForm()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 提交表单
|
// 提交表单
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user