From 6da78f667c6314148a871c07748d42895b65d79c Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期三, 28 一月 2026 15:22:33 +0800
Subject: [PATCH] 前端webpack更改vite

---
 Code/WCS/WIDESEAWCS_Client/src/components/editor/VolWangEditor.vue |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Client/src/components/editor/VolWangEditor.vue b/Code/WCS/WIDESEAWCS_Client/src/components/editor/VolWangEditor.vue
index d3813ae..928451d 100644
--- a/Code/WCS/WIDESEAWCS_Client/src/components/editor/VolWangEditor.vue
+++ b/Code/WCS/WIDESEAWCS_Client/src/components/editor/VolWangEditor.vue
@@ -3,7 +3,16 @@
 </template>
 
 <script>
-import E from "wangeditor";
+let E = null;
+
+async function loadWangEditor() {
+  if (!E) {
+    const module = await import("wangeditor");
+    E = module.default || module;
+  }
+  return E;
+}
+
 export default {
   props: {
     url: {
@@ -66,9 +75,10 @@
   destroyed() {
     this.editor = null;
   },
-  mounted() {
+  async mounted() {
     this.editor = null;
-    let editor = new E(this.$refs.volWangEditor);
+    const EditorConstructor = await loadWangEditor();
+    let editor = new EditorConstructor(this.$refs.volWangEditor);
     this.editor = editor;
     let $this = this;
     editor.config.zIndex = 500;

--
Gitblit v1.9.3