Property xxx was accessed during render but is not defined on instance. 和 ResizeObserver loop limit

  • 问题出现,在Vue3中引入了elementui相关报错

关于今天在Vue3中遇到的Property "size" was accessed during render but is not defined on instance. 然后还报错了ResizeObserver loop limit /(ㄒoㄒ)/~~

Property xxx was accessed during render but is not defined on instance. 和 ResizeObserver loop limit_第1张图片

出现的报错意思是 " 属性'xxx(size)'在渲染期间被访问,但未在实例上定义 "

引入elementui中Vue3template里的相关代码

Property xxx was accessed during render but is not defined on instance. 和 ResizeObserver loop limit_第2张图片

  •  解决方案(☆▽☆)

只需要在对应的组件中在实例中定义即可

然后就可以得到一个干干净净的没有报错的控制台啦!o(* ̄▽ ̄*)ブ

Property xxx was accessed during render but is not defined on instance. 和 ResizeObserver loop limit_第3张图片

 

你可能感兴趣的:(前端,javascript,vue.js,vscode,elementui)