摘要:
代码 var myPromise = new Promise(function (resolve, reject) { console.log('do sth.'); setTimeout(() => { console.log('~~~~~'); resolve('ok'); // reject( 阅读全文
摘要:
代码 var myPromise = new Promise(function (resolve, reject) { console.log('do sth.'); setTimeout(() => { console.log('~~~~~'); // resolve('ok'); reject( 阅读全文
摘要:
代码 var A = new Promise(function (resolve, reject) { console.log('do sth.'); setTimeout(() => { console.log('~~~~~'); resolve('ok'); // reject('error * 阅读全文
摘要:
代码 var A = new Promise(function (resolve, reject) { console.log('do sth.'); setTimeout(() => { console.log('~~~~~'); // resolve('ok'); reject('error * 阅读全文
摘要:
只处理成功 var A = new Promise(function (resolve, reject) { console.log('do sth.'); setTimeout(() => { console.log('~~~~~'); resolve('ok'); // reject('erro 阅读全文