vue-router addRoutes

let routes = [
{
path: "/cover/:id",
component: resolve => require(['./cover.vue'], resolve),
name: "cover",
},]

this.$router.options.routes.push(routes);

this.$router.addRoutes(routes);

posted @ 2020-04-23 21:56  mrt_yy  阅读(830)  评论(0编辑  收藏  举报