mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
!492 富文本编辑器自动聚焦问题 update yudao-ui-admin/src/components/Editor/index.vue.
Merge pull request !492 from zbk/N/A
This commit is contained in:
commit
f59119bf6e
@ -84,7 +84,7 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
placeholder: "请输入内容",
|
placeholder: "请输入内容",
|
||||||
readOnly: this.readOnly,
|
readOnly: true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -123,6 +123,13 @@ export default {
|
|||||||
init() {
|
init() {
|
||||||
const editor = this.$refs.editor;
|
const editor = this.$refs.editor;
|
||||||
this.Quill = new Quill(editor, this.options);
|
this.Quill = new Quill(editor, this.options);
|
||||||
|
// 取消自动聚焦 start
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.Quill.blur();
|
||||||
|
if(!this.readOnly){
|
||||||
|
this.Quill.enable();
|
||||||
|
}
|
||||||
|
});
|
||||||
// 如果设置了上传地址则自定义图片上传事件
|
// 如果设置了上传地址则自定义图片上传事件
|
||||||
if (this.type === 'url') {
|
if (this.type === 'url') {
|
||||||
let toolbar = this.Quill.getModule("toolbar");
|
let toolbar = this.Quill.getModule("toolbar");
|
||||||
|
Loading…
Reference in New Issue
Block a user