Ver código fonte

富文本编辑器

zhuliu 1 ano atrás
pai
commit
83cae4efa2

+ 2 - 2
src/config/index.js

@@ -3,6 +3,6 @@ export default {
     updateTime:'2023-08-04 08:00:00',
     specialDays:['05-12','09-18','12-13'],
     host: window.location.host,
-    staticURL: process.env.NODE_ENV === 'production' ? '139.224.24.90' : '192.168.1.24',
-    WebSocketPath: process.env.NODE_ENV === 'production' ? '139.224.24.90:8879' : '192.168.1.24:8877',
+    staticURL: process.env.NODE_ENV !== 'production' ? '139.224.24.90' : '192.168.1.24',
+    WebSocketPath: process.env.NODE_ENV !== 'production' ? '139.224.24.90:8879' : '192.168.1.24:8877',
 }

+ 27 - 0
src/utils/model/prosemirror/index.vue

@@ -0,0 +1,27 @@
+<template>
+    <editor-content :editor="editor" />
+</template>
+  
+  <script>
+  // Import the editor
+  import { Editor, EditorContent } from 'tiptap'
+  
+  export default {
+    components: {
+      EditorContent,
+    },
+    data() {
+      return {
+        editor: null,
+      }
+    },
+    mounted() {
+      this.editor = new Editor({
+        content: '<p>This is just a boring paragraph</p>',
+      })
+    },
+    beforeDestroy() {
+      this.editor.destroy()
+    },
+  }
+  </script>

+ 4 - 2
src/utils/model/route.vue

@@ -12,7 +12,7 @@
     <!-- <div @mouseup="up">
       gsdtuicsahcviodkfvdf
     </div> -->
-    <noPermission></noPermission>
+    <prosemirror></prosemirror>
   </div>
 </template>
 
@@ -22,13 +22,15 @@ import avoidDirection from '@/views/report/avoid/components/avoidDirection.vue'
 import PatentField from '@/views/project/patentDetails/components/PatentField.vue'
 import errorPage from '@/views/components/errorPage/403.vue'
 import noPermission from './noPermission/index.vue'
+import prosemirror from './prosemirror/index.vue'
 export default {
   components: {
     myView2,
     avoidDirection,
     PatentField,
     errorPage,
-    noPermission
+    noPermission,
+    prosemirror
   },
   props: {},
   data() {