Vue.js 刷新后的Nuxt.js双链接
当它生成生产代码宽度“npm run generate”时,我有一个错误 在本网站 当我刷新页面nuxt时,添加到boostrap导航链接/about/aboutVue.js 刷新后的Nuxt.js双链接,vue.js,nuxt.js,Vue.js,Nuxt.js,当它生成生产代码宽度“npm run generate”时,我有一个错误 在本网站 当我刷新页面nuxt时,添加到boostrap导航链接/about/about <b-navbar toggleable="md"> <b-navbar-toggle target="nav_collapse"></b-navbar-toggle> <b-navbar-brand :to="{ path: '/' }"
<b-navbar toggleable="md">
<b-navbar-toggle target="nav_collapse"></b-navbar-toggle>
<b-navbar-brand :to="{ path: '/' }">#jwcreation</b-navbar-brand>
<b-collapse is-nav id="nav_collapse">
<b-navbar-nav class="center">
<b-nav-item :to="{ path: '/' }">home</b-nav-item>
<b-nav-item :to="{ path: 'about' }">about</b-nav-item>
</b-navbar-nav>
<!-- Right aligned nav items -->
<b-navbar-nav class="right">
<b-nav-item :to="{ path: 'test' }">hello@jwcreation.pl</b-nav-item>
</b-navbar-nav>
</b-collapse>
</b-navbar>
“关于”路径必须是绝对路径,否则将与当前路径一起累积:
<b-nav-item :to="{ path: '/about' }">about</b-nav-item>
另一种方法是根据名称页约定定义关于链接
<b-nav-item :to="{ name: 'about' }">about</b-nav-item>
例如。
pages/test.vue=>name:'test'
pages/parent/child.vue=>name:'parent-child'
pages/parent/yolo/index.vue=>name:'parent yolo'您能给我们显示该导航的代码吗?请仅对实际答案使用“发布答案”按钮。您可以通过原始问题添加其他信息。我正在编辑帖子并添加导航条形码: