Skip to content

Commit af4ee2e

Browse files
YunaiVgitee-org
authored andcommitted
!492 富文本编辑器自动聚焦问题 update yudao-ui-admin/src/components/Editor/index.vue.
Merge pull request !492 from zbk/N/A
2 parents 41867d5 + 6143f59 commit af4ee2e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/components/Editor/index.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export default {
8484
],
8585
},
8686
placeholder: "请输入内容",
87-
readOnly: this.readOnly,
87+
readOnly: true,
8888
},
8989
};
9090
},
@@ -123,6 +123,13 @@ export default {
123123
init() {
124124
const editor = this.$refs.editor;
125125
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+
});
126133
// 如果设置了上传地址则自定义图片上传事件
127134
if (this.type === 'url') {
128135
let toolbar = this.Quill.getModule("toolbar");

0 commit comments

Comments
 (0)