From 74af48f68cade4c70ec9931864e848a7185eb529 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 2 Nov 2022 21:12:31 +0800 Subject: [PATCH] =?UTF-8?q?style(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E6=A0=91?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=99=A8=E6=A0=B7=E5=BC=8F=E5=88=86=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/ElTreeSelect/index.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/frontend/src/components/ElTreeSelect/index.vue b/frontend/src/components/ElTreeSelect/index.vue index 529836d36b..20f09c9dd9 100644 --- a/frontend/src/components/ElTreeSelect/index.vue +++ b/frontend/src/components/ElTreeSelect/index.vue @@ -262,12 +262,22 @@ export default { this._updateH() this.$nextTick(() => { on(document, 'mouseup', this._popoverHideFun) + this.bindScroll() }) }, beforeDestroy() { off(document, 'mouseup', this._popoverHideFun) + this.unbindScroll() }, methods: { + bindScroll() { + window.onmousewheel = this._popoverHideFun + on(document, 'DOMMouseScroll', this._popoverHideFun) + }, + unbindScroll() { + window.onmousewheel = null + off(document, 'DOMMouseScroll', this._popoverHideFun) + }, showPopover() { this.$nextTick(() => { this.$refs.input.focus()