告诉我如何为组件 v-list-group 设置链接

Ник*_*еев 0 vuejs2 vuetify.js

以vuetifyjs.com网站的导航为例,【扩展列表】如何添加该组件的链接?

<v-list-item-content>
    <v-list-item-title v-text="subItem.title"></v-list-item-title> //how to specify the link address
</v-list-item-content>
Run Code Online (Sandbox Code Playgroud)

小智 6

对于外部链接:

只需在元素上设置href属性/道具即可<v-list-item>

模板风格:

<v-list-item :href="'../index.html'">

渲染函数风格:

 createElement('v-list-item',
          { attrs: { href: '../index.html' } },
          [             
            createElement('v-list-item-content', {}, ['Index'])
          ]
        )
Run Code Online (Sandbox Code Playgroud)

或者对于内部路由:

使用to道具<v-list-item>