From f137032eed5c0f5e322d6900f2e19ed89457494a Mon Sep 17 00:00:00 2001 From: webpack Date: Tue, 21 Jul 2020 11:36:14 +0800 Subject: [PATCH] fix popper.js: Turn off scroll event monitoring to solve the problem of scroll lag When there are more Tooltip components on the page, it is easy to cause the page scrolling to be severely stuck. It is recommended to close it by default. --- src/components/base/popper.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/base/popper.js b/src/components/base/popper.js index cdbe6d8ba..9b94cac47 100644 --- a/src/components/base/popper.js +++ b/src/components/base/popper.js @@ -7,6 +7,10 @@ const Popper = isServer ? function() {} : require('popper.js/dist/umd/popper.js' export default { props: { + eventsEnabled: { + type: Boolean, + default: false + }, placement: { type: String, default: 'bottom' @@ -85,6 +89,8 @@ export default { if (this.popperJS && this.popperJS.hasOwnProperty('destroy')) { this.popperJS.destroy(); } + + options.eventsEnabled = this.eventsEnabled; options.placement = this.placement;