记录小技巧--前端等所有的请求都结束了再刷新页面,button对齐input

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;
                  }
                });
              }

2.button对齐input

.xxx{
            position: absolute;
            height: 43.6px;
            width: 120px;
            cursor: pointer;
            border: 1px solid #C9CFD8;
            border-left: none;
        }

你可能感兴趣的:(springboot,前端)