From 56d180ab8d0d66599e267f7aab8b76238a5c3f22 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 24 Jan 2025 09:15:17 +0300 Subject: [PATCH] P-134 --- src/front/src/views/VoteHomePage.vue | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/front/src/views/VoteHomePage.vue b/src/front/src/views/VoteHomePage.vue index 8420e11ad..99eb3e31c 100644 --- a/src/front/src/views/VoteHomePage.vue +++ b/src/front/src/views/VoteHomePage.vue @@ -37,7 +37,7 @@ - + @@ -88,6 +88,7 @@ export default { const route = useRoute(); const res = ref(null); const result = ref(null); + const constructor = ref(null) const updating = async (param) => { const data = await getVotes(param); @@ -162,7 +163,15 @@ export default { } }; - watch(currentTab, async () => await updating(currentTab.value)) + watch(currentTab, async () => { + if (currentTab.value !== 'constructor') { + await updating(currentTab.value) + console.log(constructor.value, '!!!'); + if (constructor.value !== null) { + constructor.value.resetForm() + } + } + }) watch( () => route, @@ -204,7 +213,8 @@ export default { updating, res, tabs, - result + result, + constructor }; }, };