async init() {
// 数据字典:库区号
await this.$http
.get("/api/ms/api/getlist1")
.then((res) => {
this.stockNo = res.data.map((ele) => {
return { value: ele.stockId, label: ele.stockName };
});
});
this.$http.get("/api/ms/api/getlist2").then((res) => {
this.tableData = res.data;
});
},
使用async await语法糖,可以避免出现回调地域