A novice, who has encountered some problems in router, has been studying and solving the problem of unfinished business for a long time. I would like to ask the jump problem of the named route.
<template>
<div class="clearfix">
<TopNavigationBar></TopNavigationBar>
<SideNavigation></SideNavigation>
<div class="main-right">
<router-view name="SecondTitle"></router-view>
<router-view name="table"></router-view>
</div>
</div>
</div>
</template>
router-view
route
<template>
<div id="app">
<router-view></router-view>
</div>
</template>
app.vuerouter-viewrouterrouter
routes: [
{
//
path: "/",
name: "login",
component: ()=>import("@/views/login/login")
},
{
//
path: "/layout",
name: "layout",
// redirect: "layout/TwoLevelHeadlines",
component: ()=>import("@/views/layout/AppMain"),
children: [{
//
name: "BasicSettingsTitle",
path: "BasicSettingsTitle",
components: {
SecondTitle: ()=>import("@/views/layout/SecondTitle/BasicSettingsTitle"),
},
//table
children: [{
name: "department",
path: "department",
components: {
table: ()=>import("@/views/supplier/basicSettings/department")
}
}]
}
routerchildren
<el-menu-item index="/layout/BasicSettingsTitle/department"></el-menu-item>
this is the code for the department settings button
The url address of the
page has been updated, but the component has not been brushed out. I have been looking for it for a long time and have not found a problem. I would like to ask the great gods to help see where there is a problem