田八

Results 4 comments of 田八

我使用覆盖 ResizeObserver 的方式解决了这个问题,在 ResizeObserver 中添加了防抖函数,代码如下: ```js const debounce = (fn, delay) => { let timer = null; return function () { let context = this; let args = arguments; clearTimeout(timer);...

> @zeng-hang请问一下,具体是添加到哪里? main.js 或者 App.vue 都行,只要在出现问题的页面之前加载这段代码即可。

> @zeng-hang 我的还是报错,在控制台报错 ![image](https://user-images.githubusercontent.com/103021747/232316577-6688afd7-491a-4da7-8779-a19060c3d91e.png) 你这这个错误并不是上面提到的错误,你这个错误提示意思是使用 ResizeObserver 需要使用 new 操作符才行,错误代码在 main.ts 的第 30 行; 最后先弄清楚自己的问题,然后再去寻找相关答案。