摘要:
catch的用法 我们知道Promise对象除了then方法,还有一个catch方法,它是做什么用的呢?其实它和then的第二个参数一样,用来指定reject的回调,用法是这样: getNumber() .then(function(data){ console.log('resolved'); c 阅读全文
posted @ 2019-06-04 15:03 guors 阅读(156) 评论(0) 推荐(0)
|
摘要:
catch的用法 我们知道Promise对象除了then方法,还有一个catch方法,它是做什么用的呢?其实它和then的第二个参数一样,用来指定reject的回调,用法是这样: getNumber() .then(function(data){ console.log('resolved'); c 阅读全文
posted @ 2019-06-04 15:03 guors 阅读(156) 评论(0) 推荐(0) |
||