Procházet zdrojové kódy

升级quill到最新版本2.0.2

RuoYi před 1 rokem
rodič
revize
4987289a98

+ 1 - 1
ruoyi-ui/package.json

@@ -49,7 +49,7 @@
49 49
     "js-cookie": "3.0.1",
50 50
     "jsencrypt": "3.0.0-rc.1",
51 51
     "nprogress": "0.2.0",
52
-    "quill": "1.3.7",
52
+    "quill": "2.0.2",
53 53
     "screenfull": "5.0.2",
54 54
     "sortablejs": "1.10.2",
55 55
     "vue": "2.6.12",

+ 2 - 2
ruoyi-ui/src/components/Editor/index.vue

@@ -108,7 +108,7 @@ export default {
108 108
         if (val !== this.currentValue) {
109 109
           this.currentValue = val === null ? "" : val;
110 110
           if (this.Quill) {
111
-            this.Quill.pasteHTML(this.currentValue);
111
+            this.Quill.clipboard.dangerouslyPasteHTML(this.currentValue);
112 112
           }
113 113
         }
114 114
       },
@@ -136,7 +136,7 @@ export default {
136 136
           }
137 137
         });
138 138
       }
139
-      this.Quill.pasteHTML(this.currentValue);
139
+      this.Quill.clipboard.dangerouslyPasteHTML(this.currentValue);
140 140
       this.Quill.on("text-change", (delta, oldDelta, source) => {
141 141
         const html = this.$refs.editor.children[0].innerHTML;
142 142
         const text = this.Quill.getText();

+ 1 - 0
ruoyi-ui/vue.config.js

@@ -27,6 +27,7 @@ module.exports = {
27 27
   lintOnSave: process.env.NODE_ENV === 'development',
28 28
   // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
29 29
   productionSourceMap: false,
30
+  transpileDependencies: ['quill'],
30 31
   // webpack-dev-server 相关配置
31 32
   devServer: {
32 33
     host: '0.0.0.0',