ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'name' of undefined

 

 用this.waterMarkTip获取值,在fetch外面是可以获取到的,但是在then里面就undefined。

解决方案:

 

 在fetch先定义一个_this变量去存储全局的this对象。

posted @ 2020-02-25 11:34  科技改变未来☆  阅读(969)  评论(0编辑  收藏  举报