|
@ -48,9 +48,14 @@ 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){ |
|
|
|
|
|
if(currentPath=='/'){ |
|
|
|
|
|
appStore.setCategoryRoutePath(categoryRouters[0].path) |
|
|
|
|
|
}else{ |
|
|
appStore.setCategoryRoutePath(currentPath) |
|
|
appStore.setCategoryRoutePath(currentPath) |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const activeMenu = computed(() => { |
|
|
const activeMenu = computed(() => { |
|
|
return appStore.getCategoryRoutePath |
|
|
return appStore.getCategoryRoutePath |
|
|