写法1
let queryData = function queryData() {
return new Promise((resolve, reject) => {
});
};
let qu = queryData();
qu.then(xxx);写法2let queryData = new Promise((resolve, reject) => {
});
};
let qu = queryData;
qu.then(xxx);写法1 和写法2 有什么区别? 为什么要new promise 要放到return里?用意何在?
添加回答
举报
0/150
提交
取消