feat: add breadcrumb navigation example

This commit is contained in:
vince
2024-07-19 01:26:13 +08:00
parent 0c245665a9
commit 9ec91ac16d
24 changed files with 188 additions and 75 deletions

View File

@@ -80,14 +80,19 @@ function useExtraMenu() {
watch(
() => route.path,
() => {
(path) => {
const currentPath = path;
// if (preferences.sidebar.expandOnHover) {
// return;
// }
const { findMenu, rootMenu, rootMenuPath } = findRootMenuByPath(
menus.value,
route.path,
currentPath,
);
extraActiveMenu.value = rootMenuPath ?? findMenu?.path ?? '';
extraMenus.value = rootMenu?.children ?? [];
},
{ immediate: true },
);
return {