因为我eslint 选择stdand,所以在eslint.js 文件role里添加一行代码
接着引入element ui
进入element ui选择布局容器
页面这样
我直接修改好页面,直接上图
<template>
<el-container>
<el-header>
<img src="../assets/logo.png" class="logo" />
<div class="singout">
<span class="user">退出</span>
</div>
</el-header>
<el-container>
<el-aside>
<el-col>
<el-menu
class="el-menu-vertical-demo"
background-color="#263753"
text-color="#fff"
active-text-color="#ffd04b"
:unique-opened="true" 设置自己菜单是否单独打开一个
>
<el-submenu index="1">
<template slot="title">
<i class="el-icon-user-solid"></i>
<span>组织机构管理</span>
</template>
<el-menu-item-group>
<el-menu-item>组织机构管理</el-menu-item>
</el-menu-item-group>
</el-submenu>
<el-submenu index="2">
<template slot="title">
<i class="el-icon-user"></i>
<span>账号变更</span>
</template>
<el-menu-item-group>
<el-menu-item>账号变更</el-menu-item>
</el-menu-item-group>
</el-submenu>
<el-submenu index="3">
<template slot="title">
<i class="el-icon-user"></i>
<span>账号查询</span>
</template>
<el-menu-item-group>
<el-menu-item>账号查询</el-menu-item>
</el-menu-item-group>
</el-submenu>
<el-submenu index="4">
<template slot="title">
<i class="el-icon-menu"></i>
<span>功能菜单维护</span>
</template>
<el-menu-item-group>
<el-menu-item>功能菜单维护</el-menu-item>
</el-menu-item-group>
</el-submenu>
</el-menu>
</el-col>
</el-aside>
<el-main> </el-main>
</el-container>
</el-container>
</template>
<script>
export default {
name: "Home",
};
</script>
<style scoped lang="scss">
/deep/.el-header { 深度选择器,一些样式无法简单的修改
width: 100%;
height: 90px!important;
background-color: aqua;
display: flex;
justify-content: space-between;
line-height: 90px;
}
.el-menu{
height: 90vh;
}
.singout{
width: 50px;
height: 90px;
}
.logo {
width: 60px;
height: 60px;
margin-top: 15px;
}
</style>