摘要: getPromiseData(){ return new promise(resolve)=>{ setTimeout(()=>{ var userName='张三'; resolve(userName) },1000) } } 阅读全文
posted @ 2021-05-10 22:08 站在巨人的肩膀上1 阅读(76) 评论(0) 推荐(0)
摘要: this.getCallBackData((data)=>{ console.log(data); }); function getCallBackData(cb){ setTimeout(()=>{ var username='张三'; cb(username); },1000) } 阅读全文
posted @ 2021-05-10 08:32 站在巨人的肩膀上1 阅读(28) 评论(0) 推荐(0)