Browse Source

默认数据

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

5
src/layout/components/CategoryHeader.vue

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

Loading…
Cancel
Save