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 @@