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

Author: sunxi1997Created Oct 14, 2024Updated Oct 14, 2024

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