在vuejs的按钮中包含一个router-link标签 [英] Enclosing a router-link tag in a button in vuejs
本文介绍了在vuejs的按钮中包含一个router-link标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以在 button
标签中包装或封装 router-link
标签吗?
Can I wrap or enclose a router-link
tag in a button
tag?
当我按下按钮时,我希望它将我路由到所需的页面。
When I press the button, I want it to route me to the desired page.
推荐答案
您可以使用 标签
道具。
You can use tag
prop.
<router-link to="/foo" tag="button">foo</router-link>
这篇关于在vuejs的按钮中包含一个router-link标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文