From 13e9ddabf4ba3a89aa2a93fe8d3b35c8604c6813 Mon Sep 17 00:00:00 2001
From: luobisheng <727299681@qq.com>
Date: 星期三, 16 十一月 2022 17:51:29 +0800
Subject: [PATCH] 获取文件名字修改

---
 src/components/edit/index.vue |   27 +++++++++++++++++----------
 1 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/src/components/edit/index.vue b/src/components/edit/index.vue
index 7752241..731175c 100644
--- a/src/components/edit/index.vue
+++ b/src/components/edit/index.vue
@@ -11,6 +11,7 @@
             editor: null
         }
     },
+    props:['getMyBody'],
     mounted() {
         this.editor = new E('#edit');
         this.editor.config.height = 450;
@@ -18,7 +19,12 @@
             '#4b9bb7',
             '#09152f'
         ]
-        this.editor.create();
+
+        this.editor.config.onchange = (html)=>{
+            // 绗簩姝ワ紝鐩戞帶鍙樺寲锛屽悓姝ユ洿鏂板埌 textarea
+            this.$emit('getMyBody', html);
+        }
+      this.editor.create();
     },
     beforeDestroy() {
         this.editor.destroy();
@@ -28,14 +34,15 @@
 }
 </script>
 <style lang="scss" scoped>
-    #edit{
-        :deep(.w-e-toolbar){
-            background-color: #09152f !important;
-            color: #4b9bb7;
-        }
-        :deep(.w-e-text-container){
-            background-color: #09152f !important;
-            color: #4b9bb7;
-        }
+#edit {
+    :deep(.w-e-toolbar) {
+        background-color: #09152f !important;
+        color: #4b9bb7;
     }
+
+    :deep(.w-e-text-container) {
+        background-color: #09152f !important;
+        color: #4b9bb7;
+    }
+}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0