新建promise

callback(){
const promise =new Promise((resolve,rejest)=>{
console.log('2')
代码
resolve('true')
})
return promise
},
findpage(){
this.callback().then((ss)=>{
this.loading=false;
})
}
原文地址:https://www.cnblogs.com/Quxiya/p/10537059.html