This commit is contained in:
Alex committed 2025-01-24 09:15:17 +03:00
1 parent d630b2aa9d
commit 56d180ab8d
1 file changed
+13 -3
+13 -3
View File
@@ -37,7 +37,7 @@
</v-tabs-window-item>
<!-- Конструктор -->
<v-tabs-window-item v-if="accountStore.user.is_staff" class="h-100 overflow-auto" value="constructor">
<VoteConstructor @updating="updating"/>
<VoteConstructor @updating="updating" ref="constructor"/>
</v-tabs-window-item>
</v-window>
@@ -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
};
},
};