您的位置: 首页 > 文章 > [Vue warn]:Cannot read property ‘avatar‘ of undefined [Vue warn]:Cannot read property ‘avatar‘ of undefined 分类: 文章 • 2023-11-16 08:49:28 起因是我在templa中写的赋给img标签的参数 这段赋给img标签的参数,数据结构是这样的 我在data中获取这段的时候,是直接获取的整段数据 然后就产生了错误 解决办法 就是data中的数据结构,将这段获取参数的数据结构拆开