1***@qq.com
1***@qq.com
  • 发布:2020-02-18 06:30
  • 更新:2020-02-18 09:31
  • 阅读:2189

【求助】uni-app this指向问题

分类:uni-app

像这样的函数结构应该如何获取data中的值呢?
methods:{
xxx: function(){
function(){
//这里需要请求data中的值
}
}
}
xxx:

2020-02-18 06:30 负责人:无 分享
已邀请:
gftttrrtrt4

gftttrrtrt4 - s

methods: {  
     fn() {  
        const fn2 = () => {  
            console.log(this.data)        
        }  
     },  
     fn3() {  
        const that = this  
        function fn4() {  
            console.log(that.data)  
        }  
     }  
}

该问题目前已经被锁定, 无法添加新回复