首页 > 其他 > 详细

edge浏览器报错 "*this*" is not defined

时间:2019-11-08 13:08:31      阅读:75      评论:0      收藏:0      [点我收藏+]

测试页面的时候发现一个很奇怪的问题,页面在谷歌,ie跑都没有问题,可是在edge浏览器却出现一个很奇怪的错误。详细的错误信息如下:

[Vue warn]: Property or method "*this*" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties. (found in <Root>)

技术分享图片

经过一番排查发现,是vue在取值的时候,写了一个多余的this

技术分享图片

这个this过去一直认为其实就是指向该区域的vue对象,所以写不写其实没关系,这个代码在谷歌和ie都没问题,唯独在这个edge浏览器报错,去掉这个this就没问题了。

 

 

 

 

edge浏览器报错 "*this*" is not defined

原文:https://www.cnblogs.com/mayiaction/p/11819089.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!