功能分配增加防抖
This commit is contained in:
@@ -134,7 +134,8 @@ export default {
|
|||||||
optionsParty: [],
|
optionsParty: [],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
search: {name: ""},
|
search: {name: ""},
|
||||||
ids: []
|
ids: [],
|
||||||
|
lock: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -205,7 +206,10 @@ export default {
|
|||||||
updateAccount() {
|
updateAccount() {
|
||||||
this.$refs.updateAccountForm.validate(v => {
|
this.$refs.updateAccountForm.validate(v => {
|
||||||
if (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.instance.post("/app/wxcp/wxuser/empower", this.dialogForm).then(res => {
|
||||||
|
this.lock = false
|
||||||
if (res?.code == 0) {
|
if (res?.code == 0) {
|
||||||
this.dialog = false;
|
this.dialog = false;
|
||||||
this.$message.success("修改成功")
|
this.$message.success("修改成功")
|
||||||
@@ -213,6 +217,8 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$message.error(res?.msg)
|
this.$message.error(res?.msg)
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.lock = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user