About named route jumps.

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

clipboard.png
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


your SecondTitle is at the same level as table two router-view , but rendering table in children of SecondTitle won't come out unless SecondTitle renders a router-view
of name=table , if you must think of them as peers.

{
  //
  path: '/layout',
  name: 'layout',
  // redirect: 'layout/TwoLevelHeadlines',
  component: () => import('@/views/layout/AppMain'),
  children: [
    //
    {
      name: 'department',
      path: 'BasicSettingsTitle/department',
      components: {
        SecondTitle: () => import('@/views/layout/SecondTitle/BasicSettingsTitle'),
        table: () => import('@/views/supplier/basicSettings/department')
      }
    },
    //
    {
      name: 'userment',
      path: 'BasicSettingsTitle/userment',
      components: {
        SecondTitle: () => import('@/views/layout/SecondTitle/BasicSettingsTitle'),
        table: () => import('@/views/supplier/basicSettings/userment')
      }
    },
  ]
}
Menu