1.前端等所有的请求都结束了再刷新页面
let success = 0;
let total = 0;
for (let i = 0; i < that.selectedRows.length; i++) {
record = that.selectedRows[i];
API.xxx({
xxx: xxx,
xxx: xxx,
xxx: xxx,
xxx: xxx,
}).then((rsp) => {
if (1000 === rsp.code) {
success += 1;
console.log(success)
} else {
that.$message.error(rsp.msg);
}
total += 1;
if (total === that.selectedRows.length){
if (success === 0){
that.xxx(that.pageInfo.page);
} else {
that.xxx(that.pageInfo.currentSize===success?(that.pageInfo.page-1>0?that.pageInfo.page-1:0):that.pageInfo.page);
}
that.isMore = false;
}
});
}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
2.button对齐input
.xxx{
position: absolute;
height: 43.6px;
width: 120px;
cursor: pointer;
border: 1px solid #C9CFD8;
border-left: none;
}