From 54de1e997df91dc26a10ba492de2071b0bd9a490 Mon Sep 17 00:00:00 2001 From: Kostya Date: Sun, 17 Dec 2023 14:15:07 +0300 Subject: [PATCH] refactor method checkoffbtn in payments modal --- luckydiamond/src/components/PaymentsModal.vue | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/luckydiamond/src/components/PaymentsModal.vue b/luckydiamond/src/components/PaymentsModal.vue index 0780682..11c911a 100644 --- a/luckydiamond/src/components/PaymentsModal.vue +++ b/luckydiamond/src/components/PaymentsModal.vue @@ -96,9 +96,7 @@ export default { }, computed: { checkOffBtn() { - // return this.offBtn === true || this.agreeUser === false - // return this.checkBtn() - return !(this.offBtn === false && this.agreeUser !== false); + return this.checkBtn() }, }, methods: { @@ -108,14 +106,18 @@ export default { RedirectedMethodDep() { window.location.href = this.url }, - // checkBtn() { - // if (this.offBtn === false) { - // if (this.agreeUser !== false) { - // return false - // } - // } - // return true - // }, + checkBtn() { + if (this.offBtn === false) { + if (this.agreeUser !== false) { + return false + } + } + return true + }, + clickedBtnChoice(index, content) { + this.clickedBtn = index + this.amount = content + } // detectorMethod(method) { // this.closeModal() // if (method === 'dep') { @@ -129,10 +131,6 @@ export default { // return // } // }, - clickedBtnChoice(index, content) { - this.clickedBtn = index - this.amount = content - } } } \ No newline at end of file