fix bug sidebar link active
This commit is contained in:
@@ -8,7 +8,7 @@ const { menu } = defineProps({
|
|||||||
padding: Number,
|
padding: Number,
|
||||||
})
|
})
|
||||||
|
|
||||||
const active = route().current(menu.route_or_url)
|
const active = route().current(menu.route_or_url) || menu.actives.filter(active => route().current(active)).length > 0
|
||||||
const link = route().has(menu.route_or_url) ? route(menu.route_or_url) : menu.route_or_url
|
const link = route().has(menu.route_or_url) ? route(menu.route_or_url) : menu.route_or_url
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ const trace = menu => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return route().current(menu.route_or_url)
|
return route().current(menu.route_or_url) || menu.actives.filter(active => route().current(active)).length > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
const active = childs.find(trace)
|
const active = childs.find(trace)
|
||||||
|
|||||||
Reference in New Issue
Block a user