工单报备按钮加防重复点击,提交报备做必填项的判断

This commit is contained in:
2023-08-22 18:05:12 +08:00
parent 37e4b8d514
commit 2b5e3a7396
9 changed files with 104 additions and 46 deletions

View File

@ -37,5 +37,25 @@ export const myMixins = {
h5GoBack(){
this.$router.back();
},
noMultipleClicks(methods, info) {
// methods是需要点击后需要执行的函数 info是点击需要传的参数
let that = this;
if (that.noClick) {
// 第一次点击
that.noClick = false;
if (info && info !== '') {
//info是执行函数需要传的参数
methods(info)
} else {
methods();
}
setTimeout(() => {
console.log("shengxiaoxi")
that.noClick = true;
}, 3000)
} else {
// 这里是重复点击的判断
}
}
}
}