想要做到这种效果:

1.

<template>
  <div>
    <!--      学生管理页面-->
    <el-row>
      <el-col :span="4">
        <el-menu
          default-active="/stuAdmin/stuSignInfo"
          router
          style="padding-top: 35%">

          <el-menu-item index="/stuAdmin/stuSignInfo">
            <i class="el-icon-location"></i>
            <span>签到信息</span>
          </el-menu-item>
          
        </el-menu>
      </el-col>

      <el-col :span="20">
          <router-view   ></router-view>
      </el-col>
    </el-row>

  </div>
</template>

2.路由:

{
    path:'/stuAdmin',
    name:'stuAdmin',
    component:()=>import("@/components/stuAdmin"),
    children:[
      {
        path:'/stuAdmin/stuSignInfo',
        component: () => import("@/stuFrame/stuSignInfo"),
      },
      ....
      ....
    ]
  },

主要用到 children

Logo

前往低代码交流专区

更多推荐