Browse Source

默认数据

master_hella_20240701
yufei0306 7 months ago
parent
commit
bc2106289b
  1. 7
      src/layout/components/CategoryHeader.vue

7
src/layout/components/CategoryHeader.vue

@ -48,8 +48,13 @@ export default defineComponent({
console.log('categoryRouters==',categoryRouters) console.log('categoryRouters==',categoryRouters)
// //
const currentPath = useRouter().currentRoute.value.matched[0].path const currentPath = useRouter().currentRoute.value.matched[0].path
console.log('默认数据',currentPath)
if(currentPath){ if(currentPath){
appStore.setCategoryRoutePath(currentPath) if(currentPath=='/'){
appStore.setCategoryRoutePath(categoryRouters[0].path)
}else{
appStore.setCategoryRoutePath(currentPath)
}
} }
const activeMenu = computed(() => { const activeMenu = computed(() => {

Loading…
Cancel
Save