From 09579837c99a2c5fbb80441f2377b93b4088f8d2 Mon Sep 17 00:00:00 2001 From: Coffee-crocodile <1147347984@qq.com> Date: Wed, 12 Oct 2022 16:04:26 +0800 Subject: [PATCH] =?UTF-8?q?feat(project):=20=E5=A2=9E=E5=8A=A0md=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=E5=92=8C=E5=AF=8C=E6=96=87=E6=9C=AC=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 ++ src/views/plugin/editor/md/index.vue | 13 +++++-- src/views/plugin/editor/rich/index.vue | 49 ++++++++++++++++++++++++-- vite.config.ts | 3 ++ 4 files changed, 64 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 304438c..d904fa9 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,11 @@ "./src/**/*.{js,jsx,ts,tsx,less,json}": "prettier --loglevel warn --write" }, "dependencies": { + "@wangeditor/editor": "^5.1.21", + "@wangeditor/editor-for-vue": "^5.1.12", "axios": "^0.27.2", "echarts": "^5.4.0", + "md-editor-v3": "^2.3.0", "pinia": "^2.0.20", "pinia-plugin-persist": "^1.0.0", "vue": "^3.2.37", diff --git a/src/views/plugin/editor/md/index.vue b/src/views/plugin/editor/md/index.vue index 8fe0d81..ff02554 100644 --- a/src/views/plugin/editor/md/index.vue +++ b/src/views/plugin/editor/md/index.vue @@ -1,7 +1,16 @@ - + diff --git a/src/views/plugin/editor/rich/index.vue b/src/views/plugin/editor/rich/index.vue index 91e4437..3b49891 100644 --- a/src/views/plugin/editor/rich/index.vue +++ b/src/views/plugin/editor/rich/index.vue @@ -1,7 +1,52 @@ - + diff --git a/vite.config.ts b/vite.config.ts index 8e26e23..8ef8893 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -40,5 +40,8 @@ export default defineConfig(({ command, mode }: ConfigEnv) => { reportCompressedSize: false, // 启用/禁用 gzip 压缩大小报告 sourcemap: false, // 构建后是否生成 source map 文件 }, + optimizeDeps: { + include: ['echarts', 'md-editor-v3', '@wangeditor/editor', '@wangeditor/editor-for-vue'], + }, }; });