style: 💄 代码格式调整,完善注释

Former-commit-id: fecca52be3ae2909242d8e7de65a37ceeac493e5
This commit is contained in:
郝先瑞
2023-04-19 08:07:25 +08:00
parent 53fc7de3db
commit d9e5540909

View File

@@ -20,7 +20,6 @@
</template>
<script setup lang="ts">
import { onBeforeUnmount, shallowRef, reactive, toRefs } from "vue";
import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
// API 引用
@@ -37,11 +36,10 @@ const emit = defineEmits(["update:modelValue"]);
const defaultHtml = useVModel(props, "modelValue", emit);
// 编辑器实例,必须用 shallowRef
const editorRef = shallowRef();
const toolbarConfig = ref({});
const editorRef = shallowRef(); // 编辑器实例,必须用 shallowRef
const mode = ref("default"); // 编辑器模式
const toolbarConfig = ref({}); // 工具条配置
// 编辑器配置
const editorConfig = ref({
placeholder: "请输入内容...",
MENU_CONF: {
@@ -57,8 +55,6 @@ const editorConfig = ref({
},
});
const mode = ref("default");
const handleCreated = (editor: any) => {
editorRef.value = editor; // 记录 editor 实例,重要!
};