RuoYi
2021-03-30 1ab84cb0e5d93b6ea335ed8df2c4bb9f0e967a78
ruoyi-ui/src/components/Editor/index.vue
@@ -26,6 +26,11 @@
      type: Number,
      default: null,
    },
    /* 只读 */
    readOnly: {
      type: Boolean,
      default: false,
    }
  },
  data() {
    return {
@@ -51,7 +56,7 @@
          ],
        },
        placeholder: "请输入内容",
        readOnly: false,
        readOnly: this.readOnly,
      },
    };
  },
@@ -71,9 +76,9 @@
    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);
          }
        }
      },
@@ -114,7 +119,7 @@
</script>
<style>
.editor {
.editor, .ql-toolbar {
  white-space: pre-wrap!important;
  line-height: normal !important;
}
@@ -192,4 +197,4 @@
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
  content: "等宽字体";
}
</style>
</style>