连点限制

This commit is contained in:
zhaoxiao
2021-10-12 10:12:26 +08:00
parent e9f9ca6cab
commit 93e7e8a4f0
25 changed files with 237 additions and 141 deletions
@@ -232,7 +232,7 @@
</div>
<!-- /分期信息-->
<a-form-item class="table-operator">
<a-button type="primary" @click="handleSave" v-preventclick>保存</a-button>
<a-button type="primary" @click="handleSave" :loading="confirmLoading">保存</a-button>
<a-button @click="handleCancle">取消</a-button>
</a-form-item>
</a-form>
@@ -487,6 +487,10 @@ export default {
* 表单提交
*/
handleSave() {
if (this.confirmLoading) {
return
}
this.confirmLoading = true
// 验证分期信息
this.$refs.installmentForm.handleSave()
this.form.validateFields((err, values) => {
@@ -518,11 +522,15 @@ export default {
this.$message.warning(res.message)
}
}).finally(() => {
this.confirmLoading = false
setTimeout(() => {
this.confirmLoading = false
}, 1000)
})
} else {
this.confirmLoading = false
}
} else {
this.confirmLoading = false
}
})
},