Przeglądaj źródła

静态知识富文本工具栏删减需求096

zhouna 6 lat temu
rodzic
commit
9dd6f5b641
1 zmienionych plików z 13 dodań i 1 usunięć
  1. 13 1
      src/components/icss/MedicineInfoPg.vue

+ 13 - 1
src/components/icss/MedicineInfoPg.vue

@@ -48,6 +48,15 @@
     },
     data(){
       return {
+        toolbars: [[
+          ['bold','underline', 'strike'],
+          [{'list': 'ordered'}, {'list': 'bullet'}],
+          [{'script': 'sub'}, {'script': 'super'}],
+          [{'color': []}, {'background': []}],
+          [{'align': []}],
+          ['image']
+        ]],
+        toolbarMode:0,
         editorOption: {
           modules: {
             ImageExtend: {
@@ -80,7 +89,7 @@
                 'image': function () {
                   QuillWatch.emit(this.quill.id)
                 }
-              }
+              },
             }
           }
         },
@@ -116,6 +125,9 @@
         this.data.text = this.$refs.quillEditor.quill.root.innerText;
       }
     },
+    created(){
+      this.editorOption.modules.toolbar.container = this.toolbars[this.toolbarMode]
+    },
     mounted(){
       //显示位置枚举列表
       const pos = localStorage.getItem("knowledgeEnumsData");