diff --git a/src/layouts/index.vue b/src/layouts/index.vue index c7f1b35..4e35779 100644 --- a/src/layouts/index.vue +++ b/src/layouts/index.vue @@ -32,8 +32,8 @@ const { menus: routeStore.menus, }) -watch(() => route.path, (value: string) => { - activeKey.value = value +watch(() => route.path, () => { + activeKey.value = routeStore.activeMenu }, { immediate: true }) // 移动端抽屉控制