Merge branch 'Alex' into develop

This commit is contained in:
Nukeap committed 2025-01-24 09:15:40 +03:00
commit 03fde14c11
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>
@@ -91,6 +91,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);
@@ -165,7 +166,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,
@@ -207,7 +216,8 @@ export default {
updating,
res,
tabs,
result
result,
constructor
};
},
};