2021年3月18日
摘要: Promise的then方法是可以被链式调用的, 后面then方法的回调函数拿到值的是上一个then方法的回调函数的返回值。 要实现then方法的链式调用,首先需要保存每一个then方法都返回一个Promise对象: 然后将拿到的上一个then方法的返回值,传递给下一个then方法的回调函数: co 阅读全文
posted @ 2021-03-18 11:06 紅葉 阅读(61) 评论(0) 推荐(0) 编辑