vue3 开发过程遇到这样一个报错
TypeError: Cannot read properties of null (reading 'shapeFlag')
- 最后发现是ref定义的变量,在访问时没有使用
.value - reactive 变量初始化是数组,如果使用字符串赋值时也会报这个错。
文章讲述了在Vue3开发过程中遇到关于ref变量的TypeError,原因在于对null进行shapeFlag属性读取,解决办法是在使用数组或字符串时确保先用valuereactive初始化变量。
vue3 开发过程遇到这样一个报错
TypeError: Cannot read properties of null (reading 'shapeFlag')
.value
6670
2万+
5万+
3万+

被折叠的 条评论
为什么被折叠?