2018-05-25 00:38:52 +08:00
|
|
|
/**
|
2020-09-18 10:32:10 +08:00
|
|
|
* @author yutent<yutent.io@gmail.com>
|
|
|
|
* @date 2020/09/16 12:09:06
|
2018-05-25 00:38:52 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
if (!Promise.defer) {
|
|
|
|
Promise.defer = function() {
|
|
|
|
let obj = {}
|
|
|
|
obj.promise = new Promise((resolve, reject) => {
|
|
|
|
obj.resolve = resolve
|
|
|
|
obj.reject = reject
|
|
|
|
})
|
|
|
|
return obj
|
|
|
|
}
|
|
|
|
}
|