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