<Button type="primary" @click="bookok" :disabled="isDisable">確定</Button>
<script>
export default {
return {
isDisable: false,//表單重復提交
},
methods: {
bookok() {
this.isDisable = true //開始可以點擊
this.post("api/student/Bespeak/getBespeak", {
'stuId':this.rowData.stuId,
'bespeakId':this.rowData.bespeakId,
'courseId':this.courseId
}).then(data => {
this.isDisable = false;//執行請求后就不能點擊了
if (data.code == 0) {
this.isShow = true
this.$Message.success("預約成功");
this.btnSearch()
} else {
this.$Message.error(data.msg);
}
});
},
}
}
</script>