From 025d0abeae4dd012f63b5f60ffb52858b4b1be24 Mon Sep 17 00:00:00 2001 From: Orange Date: Tue, 5 Jan 2021 16:45:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E6=A0=91=E8=B6=85=E8=BF=87=E5=B1=8F=E5=B9=95=EF=BC=8C=E5=8F=B3?= =?UTF-8?q?=E9=94=AE=E8=8F=9C=E5=8D=95=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AutoDataZTree/index.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/AutoDataZTree/index.vue b/src/components/AutoDataZTree/index.vue index d9f697c19..0b8ec12b9 100644 --- a/src/components/AutoDataZTree/index.vue +++ b/src/components/AutoDataZTree/index.vue @@ -157,6 +157,11 @@ export default { y -= (offset.top + scrollTop) / 3 - 10 x += document.body.scrollLeft y += document.body.scrollTop + document.documentElement.scrollTop + + if (y + $(`#${rMenuID} ul`).height() >= window.innerHeight) { + y -= $(`#${rMenuID} ul`).height() + } + this.rMenu.css({ 'top': y + 'px', 'left': x + 'px', 'visibility': 'visible' }) $(`#${rMenuID} ul`).show() $('body').bind('mousedown', this.onBodyMouseDown)