Browse Source

v3.5.0 富文本编辑组件支持只读

YunaiV 3 years ago
parent
commit
4f770b24a4
2 changed files with 9 additions and 3 deletions
  1. 8 3
      yudao-ui-admin/src/components/Editor/index.vue
  2. 1 0
      更新日志.md

+ 8 - 3
yudao-ui-admin/src/components/Editor/index.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="editor" ref="editor" :style="styles"></div>
+  <div class="editor" ref="editor" :style="styles"></div>
 </template>
 
 <script>
@@ -26,6 +26,11 @@ export default {
       type: Number,
       default: null,
     },
+    /* 只读 */
+    readOnly: {
+      type: Boolean,
+      default: false,
+    }
   },
   data() {
     return {
@@ -51,7 +56,7 @@ export default {
           ],
         },
         placeholder: "请输入内容",
-        readOnly: false,
+        readOnly: this.readOnly,
       },
     };
   },
@@ -192,4 +197,4 @@ export default {
 .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
   content: "等宽字体";
 }
-</style>
+</style>

+ 1 - 0
更新日志.md

@@ -32,6 +32,7 @@ TODO
 * 【优化】使用 Lombok 简化 JsonUtils 工具类 [#73](https://github.com/YunaiV/ruoyi-vue-pro/pull/73)
 * 【新增】兼容 Node 16 版本,通过升级 BPMN-JS 相关库 [commit](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/4c169cbc58eb0d0cc4aead73ca127a2957e6a3aa)
 * 【新增】前端的表格右侧工具栏组件支持显隐列,具体可见【用户管理】功能 [commit](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/20e34e35a3bdc48e6a4c58e3849aa729bd18efe5)
+* 【新增】跟进 ruoyi-vue 3.4.0 版本
 
 ### 🐞 Bug Fixes