Browse Source

富文本编辑组件支持只读

RuoYi 5 years ago
parent
commit
0922410a22
1 changed files with 7 additions and 2 deletions
  1. 7 2
      ruoyi-ui/src/components/Editor/index.vue

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

@@ -26,6 +26,11 @@ export default {
26 26
       type: Number,
27 27
       default: null,
28 28
     },
29
+    /* 只读 */
30
+    readOnly: {
31
+      type: Boolean,
32
+      default: false,
33
+    }
29 34
   },
30 35
   data() {
31 36
     return {
@@ -51,7 +56,7 @@ export default {
51 56
           ],
52 57
         },
53 58
         placeholder: "请输入内容",
54
-        readOnly: false,
59
+        readOnly: this.readOnly,
55 60
       },
56 61
     };
57 62
   },
@@ -192,4 +197,4 @@ export default {
192 197
 .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
193 198
   content: "等宽字体";
194 199
 }
195
-</style>
200
+</style>