refactor(editor): 重构编辑器组件代码块顺序

- 调整MarkDownEditor和RichTextEditor为template→script→style顺序
- 统一编辑器组件结构规范
- 提升组件代码可读性
This commit is contained in:
Leo 2025-07-07 00:16:58 +08:00
parent 797c42aea1
commit a48cb3738d
2 changed files with 10 additions and 10 deletions

View File

@ -1,3 +1,9 @@
<template>
<MdEditor
v-model="model" :theme="appStore.colorMode" :toolbars-exclude="toolbarsExclude"
/>
</template>
<script setup lang="ts">
import type { ToolbarNames } from 'md-editor-v3'
@ -20,10 +26,4 @@ const toolbarsExclude: ToolbarNames[] = [
]
</script>
<template>
<MdEditor
v-model="model" :theme="appStore.colorMode" :toolbars-exclude="toolbarsExclude"
/>
</template>
<style scoped></style>

View File

@ -1,3 +1,7 @@
<template>
<div ref="editorRef" />
</template>
<script setup lang="ts">
import Quill from 'quill'
import { useTemplateRef } from 'vue'
@ -101,7 +105,3 @@ watch(
onBeforeUnmount(() => editorInst = null)
</script>
<template>
<div ref="editorRef" />
</template>