@@ -15,7 +15,7 @@ const props = defineProps({
1515 isDropdownList: Boolean ,
1616})
1717
18- const itemHref = computed (() => props .item . route ? route ( props .item .route ) : props .item .href )
18+ const itemHref = computed (() => ( props .item && props .item .link ) ? props .item .link : ' ' )
1919
2020const emit = defineEmits ([' menu-click' ])
2121
@@ -36,7 +36,7 @@ const componentClass = computed(() => (
3636 ]
3737))
3838
39- const hasDropdown = computed (() => !! props .item .menu )
39+ const hasDropdown = computed (() => props .item .children )
4040
4141const menuClick = event => {
4242 emit (' menu-click' , event , props .item )
@@ -56,7 +56,7 @@ const activeInactiveStyle = computed(
5656<template >
5757 <li >
5858 <component
59- :is =" item.route ? Link : 'a '"
59+ :is =" itemHref ? Link : 'div '"
6060 :href =" itemHref"
6161 :target =" item.target ?? null"
6262 class =" flex cursor-pointer dark:text-slate-300 dark:hover:text-white"
@@ -74,7 +74,7 @@ const activeInactiveStyle = computed(
7474 <span
7575 class =" grow text-ellipsis line-clamp-1"
7676 :class =" activeInactiveStyle"
77- >{{ item.label }}</span >
77+ >{{ item.name }}</span >
7878 <BaseIcon
7979 v-if =" hasDropdown"
8080 :path =" isDropdownActive ? mdiMinus : mdiPlus"
@@ -85,7 +85,7 @@ const activeInactiveStyle = computed(
8585 </component >
8686 <AsideMenuList
8787 v-if =" hasDropdown"
88- :menu =" item.menu "
88+ :menu =" item.children "
8989 :class =" [ styleStore.asideMenuDropdownStyle, isDropdownActive ? 'block dark:bg-slate-800/50' : 'hidden' ]"
9090 is-dropdown-list
9191 />
0 commit comments