Revert "Revert "优化服务退出流程,增加中间件文档""

This reverts commit 64ed43b7ca.
This commit is contained in:
maxbad
2023-05-15 23:17:59 +08:00
parent 64ed43b7ca
commit 06292b603b
30 changed files with 335 additions and 97 deletions

View File

@@ -1,6 +1,6 @@
<template>
<QuillEditor
ref="quillEditor"
ref="quillEditorRef"
toolbar="full"
v-model:content="content"
@ready="readyQuill"
@@ -33,7 +33,7 @@
const emit = defineEmits(['update:value']);
const message = useMessage();
const initFinish = ref(false);
const quillEditor = ref();
const quillEditorRef = ref();
const content = ref();
const props = withDefaults(defineProps<Props>(), {
value: '',
@@ -41,14 +41,14 @@
});
function readyQuill() {
quillEditor.value.setHTML(props.value);
quillEditorRef.value.setHTML(props.value);
}
watch(
() => props.value,
(newValue) => {
if (!initFinish.value) {
quillEditor.value?.setHTML(newValue);
quillEditorRef.value?.setHTML(newValue);
}
},
{
@@ -67,7 +67,7 @@
}
function onUpdateContent() {
emit('update:value', quillEditor.value.getHTML());
emit('update:value', quillEditorRef.value.getHTML());
}
function checkFileType(map: string[], fileType: string) {