- 問(wèn)題出現(xiàn),在Vue3中引入了elementui相關(guān)報(bào)錯(cuò)
關(guān)于今天在Vue3中遇到的Property "size" was accessed during render but is not defined on instance. 然后還報(bào)錯(cuò)了ResizeObserver loop limit /(ㄒoㄒ)/~~
出現(xiàn)的報(bào)錯(cuò)意思是 " 屬性'xxx(size)'在渲染期間被訪(fǎng)問(wèn),但未在實(shí)例上定義 "
引入elementui中Vue3template里的相關(guān)代碼
- ?解決方案(☆▽☆)
只需要在對(duì)應(yīng)的組件中在實(shí)例中定義即可??
<script>
import { ref } from 'vue'
export default {
name:'MyProject',
setup(){
const size = ref('')
return {size}
}
}
</script>
??然后就可以得到一個(gè)干干凈凈的沒(méi)有報(bào)錯(cuò)的控制臺(tái)啦!o(* ̄▽?zhuān)?)ブ
文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-539451.html
?文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-539451.html
到了這里,關(guān)于Property xxx was accessed during render but is not defined on instance. 和 ResizeObserver loop limit的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!