From 88e033ad7d9cc88b57adf8b529aec92d6ac92ac4 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 23 Jan 2024 13:47:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B1=95=E5=BC=80=E5=9B=BE=E8=A1=A8=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E6=A1=86=E6=BB=9A=E5=8A=A8=E6=BB=9A=E8=BD=AE=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=94=BB=E6=9D=BF=E7=BC=A9=E6=94=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-visualization/ComponentToolBar.vue | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue b/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue index c5466c4d22..43fcd4434f 100644 --- a/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue +++ b/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue @@ -41,8 +41,29 @@ const reposition = () => { // 记录瞬时wheel值 防止放大操作和滚动操作冲突 let lastWheelNum = 0 +// 检查当前页面是否有弹框 +const checkDialog = () => { + let haveDialog = false + document.querySelectorAll('.ed-overlay').forEach(element => { + if (window.getComputedStyle(element).getPropertyValue('display') != 'none') { + haveDialog = true + } + }) + document.querySelectorAll('.ed-popover').forEach(element => { + if (window.getComputedStyle(element).getPropertyValue('display') != 'none') { + haveDialog = true + } + }) + // 富文本单框 + if (document.querySelector('.tox-dialog-wrap')) { + haveDialog = true + } + + return haveDialog +} + const handleMouseWheel = e => { - if (editMode.value === 'preview') { + if (editMode.value === 'preview' || checkDialog()) { return } let dvMain = document.getElementById('dv-main-center')