以下是我的一些路线的组织方式。顶部路线有一个链接将用户带到第二个路线,另一个链接将用户带到第三个路线:
routes: [
{
path: '/sg',
name: 'sg',
component: () => import('./views/SG/SG.vue')
},
{
path: '/sg/ui',
name: 'uisg',
component: () => import('./views/SG/UISG.vue')
},
{
path: '/sg/ai',
name: 'aisg',
component: () => import('./views/SG/AISG.vue')
},
...等等。
奇怪的是,有时 Vue 会随机地从底部的两个组件中渲染出错误的组件。这真的很奇怪。当我刷新页面时,它会呈现正确的路线。这是我在 SG.vue 中调用它们的地方,非常简单:
<h3><router-link to="/sg/ai">1</router-link></h3>
<h3><router-link to="/sg/ui">2</router-link></h3>
有人可以帮忙吗?在此先感谢您。