ai-manus/chat-client/library/components/VabAppMain/index.vue

29 lines
630 B
Vue
Raw Normal View History

2025-07-18 16:38:18 +08:00
<script lang="ts" setup>
import { useRoutesStore } from '@/store/modules/routes'
import { handleActivePath } from '@/utils/routes'
const route = useRoute()
const routesStore: any = useRoutesStore()
const { tab, activeMenu } = storeToRefs(routesStore)
watch(
route,
() => {
if (tab.value.data !== route.matched[0].name)
tab.value.data = route.matched[0].name
activeMenu.value.data = handleActivePath(route)
},
{ immediate: true }
)
</script>
<template>
<div class="vab-app-main">
<section>
<vab-router-view />
</section>
<vab-footer />
</div>
</template>