【发布时间】:2021-07-02 12:58:57
【问题描述】:
有没有办法让家长在课程可点击的情况下,无需打开/关闭下面的课程项目,并且只有右侧的箭头显示/隐藏子项目。目前我刚刚添加了一个路由器链接到列表中的父项(如果它有路径)。
<v-list-group
v-if="item.children"
v-model="item.active"
:key="item.title"
:prepend-icon="item.icon"
style="border-top: solid; border-color: #004d3d; border-width: thin;"
>
<template v-slot:activator>
<v-list-item-content>
<v-list-item-title class="text">
<router-link v-if="item.path" :to="item.path">{{ item.text }}</router-link>
<span v-else>{{ item.text }}</span>
</v-list-item-title>
</v-list-item-content>
</template>
<template v-for="child in item.children">
<v-list-item
:key="child.title"
:to="child.path"
v-if="$store.getters['session/hasPermissionKey'](child.permissionKey)"
>
<v-list-item-action>
<v-icon>{{ child.icon }}</v-icon>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title class="text">
{{ child.title }}
</v-list-item-title>
</v-list-item-content>
</v-list-item>
</template>
</v-list-group>
【问题讨论】:
标签: vue.js vuetify.js