From 4014d19879f2c720d74ae601950dd341f824df32 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Wed, 24 Jul 2024 10:39:56 +0300 Subject: [PATCH] modal overflow --- components/calcValues.vue | 5 ----- components/modal.vue | 12 ++++++++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/components/calcValues.vue b/components/calcValues.vue index 7e2a7df..a2306ee 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -136,11 +136,6 @@ watch(() => form_state, changeParametres, { deep: true }) const isModalOpen = useState('modal_open', () => false) const toggleModal = () => { isModalOpen.value = !isModalOpen.value - if (isModalOpen.value == true) { - document.body.classList.add('modal-opened') - } else { - document.body.classList.remove('modal-opened') - } } const goal = (target: string, params: object) => { const nuxtApp = useNuxtApp() diff --git a/components/modal.vue b/components/modal.vue index c362e87..b1da015 100644 --- a/components/modal.vue +++ b/components/modal.vue @@ -75,6 +75,13 @@ const validate = () => { } } watch(modal_data, validate) +watch(isModalOpen, () => { + if (isModalOpen.value == true) { + document.body.classList.add('modal-opened') + } else { + document.body.classList.remove('modal-opened') + } +}) const submit = async (e: any) => { goal('submit_form', modal_data) @@ -216,8 +223,9 @@ const policy = () => { @keypress="validateInput" />
-
{{ total_txt && total_txt.total[0] }}