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)