Commit f59119bf6edbc94790f19ecf55dda5cb8fe72bfa

Authored by 芋道源码
Committed by Gitee
2 parents 382c3a46 51cf5b7c

!492 富文本编辑器自动聚焦问题 update yudao-ui-admin/src/components/Editor/index.vue.

Merge pull request !492 from zbk/N/A
yudao-ui-admin/src/components/Editor/index.vue
@@ -84,7 +84,7 @@ export default { @@ -84,7 +84,7 @@ export default {
84 ], 84 ],
85 }, 85 },
86 placeholder: "请输入内容", 86 placeholder: "请输入内容",
87 - readOnly: this.readOnly, 87 + readOnly: true,
88 }, 88 },
89 }; 89 };
90 }, 90 },
@@ -123,6 +123,13 @@ export default { @@ -123,6 +123,13 @@ export default {
123 init() { 123 init() {
124 const editor = this.$refs.editor; 124 const editor = this.$refs.editor;
125 this.Quill = new Quill(editor, this.options); 125 this.Quill = new Quill(editor, this.options);
  126 + // 取消自动聚焦 start
  127 + this.$nextTick(()=>{
  128 + this.Quill.blur();
  129 + if(!this.readOnly){
  130 + this.Quill.enable();
  131 + }
  132 + });
126 // 如果设置了上传地址则自定义图片上传事件 133 // 如果设置了上传地址则自定义图片上传事件
127 if (this.type === 'url') { 134 if (this.type === 'url') {
128 let toolbar = this.Quill.getModule("toolbar"); 135 let toolbar = this.Quill.getModule("toolbar");