连点限制
This commit is contained in:
@@ -34,11 +34,6 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
|
||||
<template slot="footer">
|
||||
<a-button @click="handleCancel">关闭</a-button>
|
||||
<a-button @click="handleOk" type="primary" v-preventclick>确定</a-button>
|
||||
</template>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
@@ -93,6 +88,10 @@ export default {
|
||||
this.visible = false
|
||||
},
|
||||
handleOk() {
|
||||
if (this.confirmLoading) {
|
||||
return
|
||||
}
|
||||
this.confirmLoading = true
|
||||
const that = this
|
||||
// 触发表单验证
|
||||
this.form.validateFields((err, values) => {
|
||||
@@ -116,8 +115,12 @@ export default {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.confirmLoading = false
|
||||
setTimeout(() => {
|
||||
this.confirmLoading = false
|
||||
}, 1000)
|
||||
})
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user