****1、项目中出现Property or method "
attrs”未在实例上定义,但在呈现期间被引用。确保在data选项中声明反应性数据属性)
what? 看到这个问题真的是一脸懵逼。查询了好久才找到问题的所在并解决
问题原因:vue版本与vue-template-compiler版本不兼容导致的
解决办法:我当时写项目vue是2.6.10 所以把vue-template-compiler也升级到2.6.10解决的问题( $attrs is readonly的问题同样适用)
npm i vue-template-compiler@当前的版本号 --save重新安装
vue项目中出现Property or method "$attrs" is not defined on the instance but referenced during render. M
猜你喜欢
转载自blog.csdn.net/xsx821/article/details/105426717
今日推荐
周排行