From ecad1d7e452d703b9a4826fc608d08327052be53 Mon Sep 17 00:00:00 2001 From: danshihao Date: Fri, 20 Sep 2024 12:03:48 +0800 Subject: [PATCH] =?UTF-8?q?[update=20=E5=AF=8C=E6=96=87=E6=9C=AC=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8]=20=E9=83=A8=E5=88=86=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/uEditor/UEditor.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/uEditor/UEditor.vue b/src/components/uEditor/UEditor.vue index 7cb6171..ea70a43 100644 --- a/src/components/uEditor/UEditor.vue +++ b/src/components/uEditor/UEditor.vue @@ -93,7 +93,7 @@ export default { UE.getEditor(this.id).ready(() => { console.log('aaa', UE.getEditor(this.id)) // 火狐浏览器格式刷会有问题,让页面失去焦点解决该问题 - UE.getEditor(this.id).body.addEventListener('blur', this.editorBlur) + this.$refs.editorBoxRef.querySelector('.edui-for-formatmatch').addEventListener('click', this.editorBlur) if (_this.fontfamily !== '') { UE.getEditor(this.id).execCommand('fontfamily', _this.fontfamily) } @@ -109,7 +109,7 @@ export default { }) }, beforeDestroy () { - UE.getEditor(this.id).body.removeEventListener('blur', this.editorBlur) + this.$refs.editorBoxRef.querySelector('.edui-for-formatmatch').removeEventListener('blur', this.editorBlur) }, destoryed () { this.editor.destory()