Files
Web_Template_Vue3_Dev/library/components/VabAppMain/index.vue
MomoWen 3e2da1115e
Some checks failed
Call HTTPS API / build (push) Has been cancelled
初始化拉取,原文件名:admin-plus-webpack5
2025-12-26 20:43:10 +08:00

29 lines
702 B
Vue

<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>