Uncaught (in promise) TypeError: Cannot read properties of null (reading 'brands 酱酱子耶 2023-04-26 220 阅读1分钟 在写vue项目时我们经常会遇见这种报错, 报错:Uncaught (in promise) TypeError: Cannot read properties of null (reading 'brands') 这句话意思是:无法读取null属性(读取'brands') 解决办法是在需要渲染的地方加一个v-if来判断数据存在 如下图 搞定!!