直接上代码
//提交
next() {
if (this.PurposeFundsData.length === 0 || this.FinancingTermData === "") {
alert("请选择必填项");
}
else {
this.a();
this.b();
this.c();
}
},
当我们点击这个提交的方法的时候要先调用a 拿到a里面的值之后 再去调用b和c 要怎么用 因为a在别的地方还要调用一次 所以我不能吧b跟c写到 a的.then里面 要怎么做呢
async next() {
if (this.PurposeFundsData.length === 0 || this.FinancingTermData === "") {
alert("请选择必填项");
} else {
await this.a(); // 注意a返一个promise
this.b();
this.c();
}
},