dedsudiyu 1 week ago
parent
commit
ebda9f2cb7

+ 28 - 4
src/components/tinymceContainer/index.vue

@@ -1,3 +1,24 @@
+<!--
+
+        <tinymce-container
+          v-model="newData.data5"
+          :height="300"
+          :max-length="500"
+          :upload-url="editorUploadUrl"
+          :upload-headers="editorUploadHeaders"
+        />
+
+        import { getToken } from "@/utils/auth";
+        import TinymceContainer from "@/components/tinymceContainer/index.vue";
+
+        components: { TinymceContainer },
+
+        editorUploadUrl: this.uploadUrl(),
+        editorUploadHeaders: {
+          Authorization:getToken(),
+        },
+
+-->
 <template>
   <div class="tinymce-container">
     <Editor
@@ -597,7 +618,7 @@ export default {
   background: #fff;
   border-radius: 6px;
   box-shadow: 0 6px 30px rgba(0,0,0,0.2);
-  width: 1000px;
+  width: 1212px;
   max-width: 96vw;
   display: flex;
   flex-direction: column;
@@ -650,12 +671,15 @@ export default {
   display: flex;
   flex-direction: column;
   align-items: center;
-  padding: 4px 10px;
+  justify-content: center;
+  padding: 0 10px;
   border: 1px solid #ccc;
   border-radius: 4px;
   background: #e8f4e8;
   cursor: pointer;
   min-width: 48px;
+  height: 60px;
+  box-sizing: border-box;
   user-select: none;
 }
 .fm-preset-btn:hover { background: #d0ebd0; }
@@ -690,8 +714,8 @@ export default {
   flex-shrink: 0;
 }
 .fm-sym-btn {
-  width: 28px;
-  height: 26px;
+  width: 40px;
+  height: 60px;
   border: 1px solid #ddd;
   background: #fff;
   border-radius: 3px;

+ 0 - 7
src/views/safetyEducationExaminationNew/questionBankManagement/questionBankManagement/addPage.vue

@@ -199,13 +199,6 @@
         });
       },
     },
-    beforeDestroy() {
-      // 组件销毁时记得销毁编辑器,防止内存泄漏
-      if (this.editor) {
-        this.editor.destroy();
-        this.editor = null;
-      }
-    }
   }
 </script>