Procházet zdrojové kódy

修复Editor组件无法对响应式更新null值问题

HaoRan před 4 roky
rodič
revize
a65c287075
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      ruoyi-ui/src/components/Editor/index.vue

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

@@ -71,9 +71,9 @@ export default {
     value: {
       handler(val) {
         if (val !== this.currentValue) {
-          this.currentValue = val;
+          this.currentValue = val === null ? "" : val;
           if (this.Quill) {
-            this.Quill.pasteHTML(this.value);
+            this.Quill.pasteHTML(this.currentValue);
           }
         }
       },