富文本 编辑器 BUG

START
鹿和sa0ChunLuyu 2 years ago
parent fd13050757
commit 41d37bf8e3

@ -41,7 +41,10 @@ const UploadImage = async (base64, key) => {
} }
}) })
} }
const editCloseClick = () => {
edit_show.value = false
tinymce.remove()
}
const editDoneClick = async () => { const editDoneClick = async () => {
let response let response
let data = JSON.parse(JSON.stringify(edit_data.value)) let data = JSON.parse(JSON.stringify(edit_data.value))
@ -55,6 +58,7 @@ const editDoneClick = async () => {
} }
$response(response, () => { $response(response, () => {
edit_show.value = false edit_show.value = false
if (edit_data.value.type === 6) tinymce.remove()
table_ref.value.setCurrentRow(null) table_ref.value.setCurrentRow(null)
if (data.id === 0) { if (data.id === 0) {
window.$message().success('创建成功') window.$message().success('创建成功')
@ -329,7 +333,7 @@ onMounted(() => {
<JsonEditorVue language="zh-CN" :modeList="[]" style="height: 400px;" mt-2 v-model="edit_data.value"/> <JsonEditorVue language="zh-CN" :modeList="[]" style="height: 400px;" mt-2 v-model="edit_data.value"/>
</div> </div>
<div v-if="edit_data.type === 6"> <div v-if="edit_data.type === 6">
<Tinymce mt-2 :ref="tinymceRef" :content="edit_data.value"></Tinymce> <Tinymce v-if="!!edit_show" mt-2 :ref="tinymceRef" :content="edit_data.value"></Tinymce>
</div> </div>
</div> </div>
<div mt-2 class="input_line_wrapper"> <div mt-2 class="input_line_wrapper">
@ -372,7 +376,7 @@ onMounted(() => {
</div> </div>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button @click="edit_show = false">关闭</el-button> <el-button @click="editCloseClick()"></el-button>
<el-button @click="editDoneClick()" type="primary">保存</el-button> <el-button @click="editDoneClick()" type="primary">保存</el-button>
</div> </div>
</template> </template>

Loading…
Cancel
Save