init
All checks were successful
Deploy / build (push) Successful in 45s

This commit is contained in:
alsaze
2025-12-01 18:04:54 +03:00
parent eb73c72954
commit c889126e77
7 changed files with 115 additions and 50 deletions

View File

@@ -69,15 +69,15 @@ const tabs = computed<TabsItem[]>(() => [
},
])
const activeTab = ref(route.path.split('/')[1] || '/')
const activeTab = ref(route?.path.split('/')[1] || '/')
watch(() => activeTab.value, () => {
const tab = tabs.value.find(tab => tab.value === activeTab.value)
router.push(tab.route)
router.push(tab?.route)
})
watch(() => route.path, () => {
const routerPath = route.path.split('/')[1]
watch(() => route?.path, () => {
const routerPath = route?.path?.split('/')[1]
if (routerPath === activeTab.value) {
return