Auto expand
This commit is contained in:
parent
078668680b
commit
90d5b9c01a
|
@ -8,7 +8,10 @@
|
|||
nav
|
||||
>
|
||||
<template v-if="group.groupTitle && !mini">
|
||||
<v-list-group :prepend-icon="group.groupIcon" :value="false">
|
||||
<v-list-group
|
||||
:prepend-icon="group.groupIcon"
|
||||
:value="shouldShowGroup(group)"
|
||||
>
|
||||
<template #activator>
|
||||
<v-list-item-title>
|
||||
<v-list-item-title>{{ group.groupTitle }}</v-list-item-title>
|
||||
|
@ -57,6 +60,13 @@ import Nav from '@/mixins/Nav'
|
|||
export default {
|
||||
name: 'NavList',
|
||||
mixins: [Nav],
|
||||
methods: {
|
||||
shouldShowGroup({ items }) {
|
||||
return items.some(item =>
|
||||
this.$route.matched.some(route => route.name === item.route.name)
|
||||
)
|
||||
}
|
||||
},
|
||||
props: {
|
||||
mini: {
|
||||
type: Boolean,
|
||||
|
|
Loading…
Reference in New Issue
Block a user