jump to unlimited child routes
routes: [
{
path: "/layout",
alias: "/",
name: "index",
component: components.HomePage,
meta: {
title: "",
icon: "ddd"
}
},
{
path: "/user/:id",
name: "user",
component: components.aaa,
meta: {title: "", icon: "chart"},
children: [
{
path: "message",
name: "message",
component: components.Message,
meta: {title: ""}
},
{
path: "authentication",
name: "authentication",
component: components.Authentication,
meta: {title: ""}
},
]
},
]
I have already used router-view in this component
<template>
<div>
fdfdsfds
<router-view/>
</div>
</template>
Jump mode
this.$router.push({
name: path[0],
params: {id: path[1]}
})
but the address bar is displayed correctly
{
path: "/user",
name: "user",
component: components.aaa,
meta: {title: "", icon: "chart"},
children: [
{
path: "/user/message",
name: "message",
component: components.Message,
meta: {title: ""}
},
{
path: "/user/authentication",
name: "authentication",
component: components.Authentication,
meta: {title: ""}
},
]
},