fix:修改任务频繁点击增加多条问题

This commit is contained in:
wyx
2022-12-20 15:35:04 +08:00
parent febf4774ee
commit 4442ca956d
7 changed files with 146 additions and 3 deletions

View File

@@ -482,6 +482,7 @@ export default {
switchC2: false,
assessmentVisible: false,
assessmentName: "",
isClick: false
});
const closeDrawer = () => {
ctx.emit("update:addliveVisible", false);
@@ -693,6 +694,13 @@ export default {
message.destroy();
return message.warning("请输入直播公告");
}
if(state.isClick){
message.destroy();
message.error('请勿频繁点击')
return
}
state.isClick = true;
const regular = /^[+]{0,1}(\d+)$/;
if (!regular.test(state.inputV2)) {
message.destroy();
@@ -743,9 +751,11 @@ export default {
message.success("提交成功");
closeDrawer();
await updateTask(res);
state.isClick = false;
})
.catch((err) => {
console.log(err);
state.isClick = false;
});
} else {
api
@@ -755,8 +765,11 @@ export default {
message.success("提交成功");
await updateTask(res);
closeDrawer();
state.isClick = false;
})
.catch(() => {});
.catch(() => {
state.isClick = false;
});
}
};
const beforeUpload = (file) => {