fix: allow sending entire route to sidebarLink
This commit is contained in:
parent
98a1fcbf00
commit
e0b3fbb5a0
@ -45,7 +45,7 @@ const props = defineProps({
|
||||
default: '',
|
||||
},
|
||||
to: {
|
||||
type: String,
|
||||
type: [Object, String],
|
||||
default: '',
|
||||
},
|
||||
isCollapsed: {
|
||||
@ -55,7 +55,11 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
function handleClick() {
|
||||
router.push({ name: props.to })
|
||||
if (typeof props.to === 'object') {
|
||||
router.push(props.to)
|
||||
} else {
|
||||
router.push({ name: props.to })
|
||||
}
|
||||
}
|
||||
|
||||
let isActive = computed(() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user