From ee2205d4f1cc9bd5c3908fdf43453f1d98f3a231 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 6 Mar 2023 14:19:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/components/Editor/index.vue | 163 ++++++++++++++++++++++++++++++ src/main.js | 5 +- src/views/system/notice/index.vue | 7 +- 4 files changed, 168 insertions(+), 8 deletions(-) create mode 100644 src/components/Editor/index.vue diff --git a/package.json b/package.json index fc1939f..c274f80 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ }, "dependencies": { "@element-plus/icons-vue": "2.0.10", + "@vueup/vue-quill": "1.1.0", "@vueuse/core": "9.5.0", "axios": "0.27.2", "echarts": "5.4.0", diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue new file mode 100644 index 0000000..ef3a832 --- /dev/null +++ b/src/components/Editor/index.vue @@ -0,0 +1,163 @@ + + + + + diff --git a/src/main.js b/src/main.js index 28725e7..b399777 100644 --- a/src/main.js +++ b/src/main.js @@ -6,13 +6,11 @@ import ElementPlus from 'element-plus' import locale from 'element-plus/lib/locale/lang/zh-cn' // 中文语言 import '@/assets/styles/index.scss' // global css - import App from './App' import store from './store' import router from './router' import directive from './directive' // directive - // 注册指令 import plugins from './plugins' // plugins import { download } from '@/utils/request' @@ -31,6 +29,8 @@ import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, select import Pagination from '@/components/Pagination' // 自定义表格工具组件 import RightToolbar from '@/components/RightToolbar' +// 富文本组件 +import Editor from "@/components/Editor" // 文件上传组件 import FileUpload from "@/components/FileUpload" // 图片上传组件 @@ -62,6 +62,7 @@ app.component('FileUpload', FileUpload) app.component('ImageUpload', ImageUpload) app.component('ImagePreview', ImagePreview) app.component('RightToolbar', RightToolbar) +app.component('Editor', Editor) app.use(router) app.use(store) diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue index 35e15c1..55fbc3a 100644 --- a/src/views/system/notice/index.vue +++ b/src/views/system/notice/index.vue @@ -143,12 +143,7 @@ - +