diff --git a/components/NavigationLink.vue b/components/NavigationLink.vue index c64a1d8..f9ff713 100644 --- a/components/NavigationLink.vue +++ b/components/NavigationLink.vue @@ -17,6 +17,17 @@ const hasChildren = computed(() => { return props.link && props.link.children && props.link.children.length > 0 || false; }); +if(hasChildren.value) +{ + props.link.children?.sort((a, b) => { + if(a._path === props.link._path) + return -1; + if(b._path === props.link._path) + return 1; + return 0; + }); +} + const collapsed = ref(!useRoute().path.startsWith(props.link._path)); diff --git a/pages/[...slug].vue b/pages/[...slug].vue index b1f455b..dc340a2 100644 --- a/pages/[...slug].vue +++ b/pages/[...slug].vue @@ -6,6 +6,7 @@ function toggleLeftPanel(_: Event) {