VUE 页面嵌套
想要做到这种效果:1.<template><div><!--学生管理页面--><el-row><el-col :span="4"><el-menudefault-active="/stuAdmin/stuSignInfo"...
·
想要做到这种效果:
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
更多推荐
已为社区贡献1条内容
所有评论(0)