美文网首页
2018-03-30 undefined is not a fu

2018-03-30 undefined is not a fu

作者: 图拉汪 | 来源:发表于2018-03-30 17:24 被阅读3次

a(b){ } 

a= b =>{} 

写法一 调用时正确 

写法二 调用时出现如标题错误 

原因:     箭头函数 this 指向 直接指向上一级

            方法二 this 指向 组件

借鉴:https://segmentfault.com/q/1010000008345110

相关文章

网友评论

      本文标题:2018-03-30 undefined is not a fu

      本文链接:https://www.haomeiwen.com/subject/rabicftx.html