From 1ab84cb0e5d93b6ea335ed8df2c4bb9f0e967a78 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Tue, 30 Mar 2021 17:46:43 +0800
Subject: [PATCH] 修复firefox下表单构建拖拽会新打卡一个选项卡
---
ruoyi-ui/src/components/Editor/index.vue | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/ruoyi-ui/src/components/Editor/index.vue b/ruoyi-ui/src/components/Editor/index.vue
index 6eb2687..c4d3269 100644
--- a/ruoyi-ui/src/components/Editor/index.vue
+++ b/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>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3