We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mounted () { if (this.trigger === 'click') { this.$refs.popover.addEventListener('click', this.onClick) } else { this.$refs.popover.addEventListener('mouseenter', this.open) this.$refs.popover.addEventListener('mouseleave', this.close) } }, destroyed () { if (this.trigger === 'click') { this.$refs.popover.removeEventListener('click', this.onClick) } else { this.$refs.popover.removeEventListener('mouseenter', this.open) this.$refs.popover.removeEventListener('mouseleave', this.close) } },
应该是没有hover或者click触发时组件并不会被实例化,导致eventListener没有被添加,在最后destroyed时就会找不到这个事件监听器,就会出现无法移除报错情况
The text was updated successfully, but these errors were encountered:
嗯,我应该用 beforeDestroy
Sorry, something went wrong.
No branches or pull requests
应该是没有hover或者click触发时组件并不会被实例化,导致eventListener没有被添加,在最后destroyed时就会找不到这个事件监听器,就会出现无法移除报错情况
The text was updated successfully, but these errors were encountered: