功能分配增加防抖

This commit is contained in:
aixianling
2021-12-31 17:19:59 +08:00
parent 1020513f13
commit 1013f2b29c

View File

@@ -134,7 +134,8 @@ export default {
optionsParty: [],
tableData: [],
search: {name: ""},
ids: []
ids: [],
lock: false
}
},
methods: {
@@ -205,7 +206,10 @@ export default {
updateAccount() {
this.$refs.updateAccountForm.validate(v => {
if (v) {
if (this.lock) return this.$message.error("请勿多次提交!")
this.lock = true
this.instance.post("/app/wxcp/wxuser/empower", this.dialogForm).then(res => {
this.lock = false
if (res?.code == 0) {
this.dialog = false;
this.$message.success("修改成功")
@@ -213,6 +217,8 @@ export default {
} else {
this.$message.error(res?.msg)
}
}).catch(() => {
this.lock = false
})
}
})