我用Bootstrap-vue tabs.这是标签的HTML:
<b-tabs>
<b-tab title="Exotic Dogs" href="#dogs">
<br>Dogs here
</b-tab>
<b-tab title="Exotic Cats" href="#cats">
<br>Cats here
</b-tab>
</b-tabs>
以下是cat 的路由:
{
path: '/animals/:id#cats',
name: 'getCats',
component: Animals // removed from HTML to simplify
},
在组件代码中:
this.$router.replace({ name: 'getCats', params: { id: this.$route.params.id }})
这需要:
本地主持人:3000/动物/234909888#cat
但是"狗"选项卡是打开的(第一个选项卡),而不是"cat "选项卡.刷新浏览器也会显示空白页面.
如何解决这个问题?