上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 26 下一页
摘要: let promise = new Promise((resolve,reject)=>{ setTimeout(() => { resolve('ok 成功了') }, 10000); }) const wrap = promise=>{ let abort let myP = new Promi 阅读全文
posted @ 2020-06-09 21:20 TTtttt5 阅读(472) 评论(0) 推荐(0) 编辑
摘要: / all 方法 最终返回的是一个promise // 如果全成功了 才算成功 如果一个失败了 就失败了 function isPromise(x) { if((typeof x 'object' && x!==null) || typeof x == 'function'){ if(typeof 阅读全文
posted @ 2020-06-09 20:57 TTtttt5 阅读(157) 评论(0) 推荐(0) 编辑
摘要: let promise2 = new Promise((resolve, reject) => { if (this.status RESOLVED) { setTimeout(() => { try { let x = onFulfilled(this.value); resolvePromise 阅读全文
posted @ 2020-06-09 20:52 TTtttt5 阅读(480) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/weixin_30577801/article/details/102246577 https://www.cnblogs.com/luwei-web/p/10275400.html 阅读全文
posted @ 2020-06-09 10:39 TTtttt5 阅读(224) 评论(0) 推荐(0) 编辑
摘要: // 什么叫高阶函数 : 1.如果一个函数的参数是一个函数 (回调函数也是一个高阶函数) // 2.如果一个函数返回一个函数 这个函数就叫高阶函数 // 闭包 // 1) 判断类型 1) typeof 无法辨别对象类型 2) constructor 谁构造出来的 // 3) instanceof 判 阅读全文
posted @ 2020-06-06 13:38 TTtttt5 阅读(121) 评论(0) 推荐(0) 编辑
摘要: // 什么叫高阶函数 : 1.如果一个函数的参数是一个函数 (回调函数也是一个高阶函数) // 2.如果一个函数返回一个函数 这个函数就叫高阶函数 // 闭包 // 对某些函数进行扩展 面向切片编程 function say(who) { // 装饰 console.log('say',who) } 阅读全文
posted @ 2020-06-06 13:15 TTtttt5 阅读(230) 评论(0) 推荐(0) 编辑
摘要: export function ensureAppTimeouts(timeouts = {}) { return { ...DEFAULT_TIMEOUTS, ...timeouts } return Object.assign({},DEFAULT_TIMEOUTS,timeouts) } 阅读全文
posted @ 2020-06-05 22:03 TTtttt5 阅读(787) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/haodawang/article/details/77199980 阅读全文
posted @ 2020-06-05 18:21 TTtttt5 阅读(91) 评论(0) 推荐(0) 编辑
摘要: export function registerApplication(loadFunction) { if (typeof loadFunction !== "function") { loadFunction = () => Promise.resolve(loadFunction); } } 阅读全文
posted @ 2020-06-05 18:11 TTtttt5 阅读(134) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/jiasm/p/9482443.html 阅读全文
posted @ 2020-06-05 15:21 TTtttt5 阅读(90) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 26 下一页