From 9057e04efad1b7d61c77a72e5c37a504d0aee935 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 26 九月 2025 09:24:03 +0800
Subject: [PATCH] H5静态化

---
 admin/src/components/common/RichEditor.vue |   27 ++++++++++++++++++++++-----
 1 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/admin/src/components/common/RichEditor.vue b/admin/src/components/common/RichEditor.vue
index d144c66..10cfeaa 100644
--- a/admin/src/components/common/RichEditor.vue
+++ b/admin/src/components/common/RichEditor.vue
@@ -1,7 +1,7 @@
 <template>
   <div :style="styleEditor">
     <Toolbar style="border-bottom: 1px solid #ccc" :editor="editor" :defaultConfig="toolbarConfig" :mode="mode" />
-    <Editor style="max-height: 300px;min-height: 100px; overflow-y: hidden;" v-model="html" :defaultConfig="editorConfig" :mode="mode"
+    <Editor style="min-height: 80px; overflow-y: hidden;" v-model="html" :defaultConfig="editorConfig" :mode="mode"
             @onCreated="onCreated" @onChange="onChange" />
   </div>
 </template>
@@ -129,7 +129,7 @@
         MENU_CONF: {
           // 鍥剧墖涓婁紶
           uploadImage: {
-            server: process.env.VUE_APP_API_PREFIX + '/visitsAdmin/cloudService/public/upload?folder=richeditor',
+            server: process.env.VUE_APP_API_PREFIX + '/web/public/uploadLocal?folder=',
             fieldName: 'file',
             // 鍗曚釜鏂囦欢鐨勬渶澶т綋绉檺鍒讹紝榛樿涓� 2M
             maxFileSize: 10 * 1024 * 1024, // 10M
@@ -204,7 +204,7 @@
           // 瑙嗛涓婁紶
           uploadVideo: {
             fieldName: 'file',
-            server: process.env.VUE_APP_API_PREFIX + '/public/upload?folder=richeditor',
+            server: process.env.VUE_APP_API_PREFIX + '/web/public/upload?folder=richeditor',
             // 鍗曚釜鏂囦欢鐨勬渶澶т綋绉檺鍒讹紝榛樿涓� 10M
             maxFileSize: 50 * 1024 * 1024, // 50M
             // 鏈�澶氬彲涓婁紶鍑犱釜鏂囦欢锛岄粯璁や负 5
@@ -281,6 +281,10 @@
   watch: {
     richData: function (value) {
       this.html = value
+      console.log("onChange123", value); // onChange 鏃惰幏鍙栫紪杈戝櫒鏈�鏂板唴瀹�
+      this.$nextTick(()=>{
+        this.html = value
+      })
     },
     readonly: function (value) {
       this.readonly = value
@@ -298,7 +302,12 @@
   methods: {
     // 缂栬緫鍣ㄥ垱寤哄畬姣曟椂鐨勫洖璋冨嚱鏁�
     onCreated(editor) {
+      var that =this
       this.editor = Object.seal(editor) // 涓�瀹氳鐢� Object.seal() 锛屽惁鍒欎細鎶ラ敊
+      setTimeout(function (){
+        that.html = that.richData
+        // alert(that.html)
+      },15000)
     },
     // 缂栬緫鍣ㄥ唴瀹广�侀�夊尯鍙樺寲鏃剁殑鍥炶皟鍑芥暟
     onChange(editor) {
@@ -314,5 +323,13 @@
   }
 })
 </script>
-<style lang="scss">
-</style>>
+<style>
+::v-deep .w-e-text-container {
+  height: 420px !important;
+}
+.w-e-text-container .w-e-scroll {
+  height: 500px !important;
+  -webkit-overflow-scrolling: touch;
+}
+</style>
+

--
Gitblit v1.9.3