xinggevip

Vue2.x Cli3.x优化router-link标签(name属性)
router.js { path: '/menu', name: 'menu', ...
扫描右侧二维码阅读全文
26
2019/05

Vue2.x Cli3.x优化router-link标签(name属性)

router.js

    {
      path: '/menu',
      name: 'menu',
      component: () => import('./components/Menu.vue')
    },
   

Header.vue

<li><router-link :to="{name:'menu'}"" class="nav-link">菜单</router-link></li>
Last modification:May 26th, 2019 at 02:27 pm
If you think my article is useful to you, please feel free to appreciate

Leave a Comment