mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 20:06:47 +08:00
fix:修改任务频繁点击增加多条问题
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user