Skip to content
New issue

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

vue 3.5+ 会报错 TypeError: Cannot read properties of null (reading 'getBoundingClientRect') #518

Open
sunxi1997 opened this issue Oct 14, 2024 · 1 comment

Comments

@sunxi1997
Copy link

image
当 LazyComponent 被卸载后, 内部的回调没有注销, 再次调用时找不到 DOM 元素, 导致程序错误

@sunxi1997
Copy link
Author

image

[email protected] 重构了 computed 逻辑, 在组件 unmounted 后, 模板引用的 ref 是没有值的
image
所以 vm.value.el 在 [email protected]+ 中是无值的, 无法被正确卸载相关的监听

sunxi1997 added a commit to sunxi1997/vue-lazyload that referenced this issue Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant