- 链接地址:https://blog.csdn.net/it_bird1999/article/details/121325533
- 链接标题:TypeError: Cannot read property ‘setData‘ of undefined_typeerror: cannot read property 'setdata' of undef-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:3366
文章浏览阅读975次。在微信小程序中出现该错误TypeError: Cannot read property ‘setData’ of undefined**问题原因:**这是典型的this指代问题,因为此时的success是回调函数,回调函数this的指向回改变。解决方法:1、使用=>函数2、不推荐,除非是不能使用es6的语法在外定义let that = this..._typeerror: cannot read property 'setdata' of undefined
版权声明:本文发布于特牛网址导航 内容均来源于互联网 如有侵权联系删除