From 81e0356656cc316cb3e3c6acb5ea9032d6888542 Mon Sep 17 00:00:00 2001 From: suixy <2277317060@qq.com> Date: Tue, 14 Oct 2025 15:25:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=90=88=E5=90=8C=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 +- src/main.ts | 6 + src/views/contract/index.vue | 208 ++++++++++++++++++++++++++++++++++- vite.config.ts | 6 +- 4 files changed, 217 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 0630a7f..c45f569 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "dependencies": { "@element-plus/icons-vue": "2.3.1", "@highlightjs/vue-plugin": "2.1.0", + "@umoteam/editor": "^8.1.0", "@vueup/vue-quill": "1.2.0", "@vueuse/core": "13.1.0", "animate.css": "4.1.1", @@ -31,11 +32,11 @@ "docx": "^9.5.1", "echarts": "5.6.0", "element-plus": "2.9.8", - "file-saver": "2.0.5", "highlight.js": "11.9.0", "image-conversion": "2.1.1", "js-cookie": "3.0.5", "jsencrypt": "3.3.2", + "mammoth": "^1.11.0", "nprogress": "0.2.0", "pinia": "3.0.2", "screenfull": "6.0.2", diff --git a/src/main.ts b/src/main.ts index 16ac610..1187a08 100644 --- a/src/main.ts +++ b/src/main.ts @@ -54,4 +54,10 @@ app.use(plugins); // 自定义指令 directive(app); +if (typeof window !== 'undefined') { + import('mammoth/mammoth.browser').then((mammoth) => { + (window as any).mammoth = mammoth; + }); +} + app.mount('#app'); diff --git a/src/views/contract/index.vue b/src/views/contract/index.vue index 0212ce9..a77c404 100644 --- a/src/views/contract/index.vue +++ b/src/views/contract/index.vue @@ -1,9 +1,212 @@