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);

猜你喜欢

转载自www.cnblogs.com/mrt-yyy/p/12763856.html