如何为v-list-item-title中的日期添加跳转至随机网址的超链接?
解决方案
直接在日期文本外层包裹 <a> 标签,通过 href 属性填入你需要跳转的网址即可,修改后的代码如下:
<v-list-item-content> <v-list-item-title> <a href="your-target-url">02.06.2023</a> </v-list-item-title> </v-list-item-content>
如果你的项目使用 Vue Router 做路由跳转,也可以替换为 <router-link> 组件:
<v-list-item-content> <v-list-item-title> <router-link to="/your-target-path">02.06.2023</router-link> </v-list-item-title> </v-list-item-content>
内容的提问来源于stack exchange,提问作者user21173904
相关产品推荐
相关产品推荐

