refactor: ♻️ 使用 wangeditor-next 替换 wangeditor ,重构简化富文本编辑器组件的封装

This commit is contained in:
ray
2025-01-22 12:48:12 +08:00
parent f4380d56a3
commit b375352c22
4 changed files with 61 additions and 50 deletions

View File

@@ -1,8 +1,8 @@
<!-- wangEditor富文本编辑器示例 -->
<script setup lang="ts">
import Editor from "@/components/WangEditor/index.vue";
import WangEditor from "@/components/WangEditor/index.vue";
const value = ref("初始内容");
const value = ref("初始内容");
</script>
<template>
@@ -15,6 +15,10 @@ const value = ref("初始内容");
>
示例源码 请点击>>>>
</el-link>
<editor v-model="value" style="z-index: 99999; height: calc(100vh - 180px)" />
<WangEditor v-model="value" height="400px" />
<div style="margin-top: 10px">
<textarea v-model="value" readonly style="width: 100%; height: 200px; outline: none" />
</div>
</div>
</template>

View File

@@ -177,9 +177,7 @@
<el-input v-model="formData.title" placeholder="通知标题" clearable />
</el-form-item>
<el-form-item label="通知内容" prop="content">
<div style="border: 1px solid #dcdfe6; border-radius: 4px">
<WangEditor v-model="formData.content" style="min-height: 480px" />
</div>
<WangEditor v-model="formData.content" />
</el-form-item>
<el-form-item label="通知类型" prop="type">
<Dict v-model="formData.type" code="notice_type" />
@@ -411,8 +409,3 @@ onMounted(() => {
handleQuery();
});
</script>
<style>
.editor-wrapper {
border: 1px solid #dcdfe6;
}
</style>