vue报错动态路由重复:vue-router.esm.js?8c4f:16 [vue-router] Duplicate named routes defi...
const createRouter = () => new Router({// mode:'history',routes: constantRouterMap})const router = createRouter()router.selfaddRoutes = function (params){const newRouter = createRouter()router.matc
·
const createRouter = () => new Router({
// mode:'history',
routes: constantRouterMap
})
const router = createRouter()
router.selfaddRoutes = function (params){
const newRouter = createRouter()
router.matcher = newRouter.matcher
router.addRoutes(params)
}
export default router
更多推荐
已为社区贡献3条内容
所有评论(0)