Commit c66eb58e authored by 拾柒's avatar 拾柒

修改样式

parent 2b706f4b
...@@ -24,6 +24,11 @@ export default { ...@@ -24,6 +24,11 @@ export default {
<style scoped> <style scoped>
#app .theme-picker { #app .theme-picker {
display: none; display: none;
//position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
} }
</style> </style>
...@@ -121,7 +121,15 @@ aside { ...@@ -121,7 +121,15 @@ aside {
//main-container全局样式 //main-container全局样式
.app-container { .app-container {
padding: 20px; width: 100vw; /* 视口宽度 */
height: 100vh; /* 视口高度 */
margin: 0;
//padding: 0;
overflow: hidden; /* 防止内容溢出 */
padding-left: 20px;
padding-right: 20px;
padding-top: 10px;
background-color: #D4D9E5;
} }
.components-container { .components-container {
......
...@@ -2,11 +2,13 @@ ...@@ -2,11 +2,13 @@
<el-menu <el-menu
:default-active="activeMenu" :default-active="activeMenu"
mode="horizontal" mode="horizontal"
active-text-color="#ffd04b"
@select="handleSelect" @select="handleSelect"
> >
<template v-for="(item, index) in newTopNev"> <template v-for="(item, index) in newTopNev">
<el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" <el-menu-item class="menuStyle" style="font-size: medium;background-color: #F6F6FA;border-top-right-radius: 30%;border-top-left-radius: 30%;text-align: center" :index="item.path" :key="index"
> >
<i :class="item.icon" style="width: 10px;height: 10px;margin-top: -12px"></i>
{{ item.name }}</el-menu-item {{ item.name }}</el-menu-item
> >
</template> </template>
...@@ -31,24 +33,30 @@ ...@@ -31,24 +33,30 @@
<script> <script>
import { constantRoutes } from "@/router"; import { constantRoutes } from "@/router";
import Menu from "@/views/system/menu/index.vue";
// 隐藏侧边栏路由 // 隐藏侧边栏路由
const hideList = ['/index', '/user/profile']; const hideList = ['/index', '/user/profile'];
export default { export default {
components: {Menu},
data() { data() {
return { return {
newTopNev: [ newTopNev: [
{ {
path: '/',
name: '首页',
}, {
path: '/monitoring/video', path: '/monitoring/video',
name: '视频监控', icon: 'el-icon-house',
name: '首页',
},
{
path: '/',
icon: 'el-icon-user',
name: '员工信息',
}, },
{ {
path: '/user/profile', path: '/user/profile',
name: '个人中心', icon: 'el-icon-view',
name: '历史记录',
} }
], ],
// 顶部栏初始数 // 顶部栏初始数
...@@ -135,6 +143,7 @@ export default { ...@@ -135,6 +143,7 @@ export default {
}, },
// 菜单选择事件 // 菜单选择事件
handleSelect(key, keyPath) { handleSelect(key, keyPath) {
console.info('key',key)
this.currentIndex = key; this.currentIndex = key;
const route = this.routers.find(item => item.path === key); const route = this.routers.find(item => item.path === key);
if (this.ishttp(key)) { if (this.ishttp(key)) {
...@@ -180,27 +189,62 @@ export default { ...@@ -180,27 +189,62 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.topmenu-container.el-menu--horizontal > .el-menu-item { //.topmenu-container.el-menu--horizontal > .el-menu-item {
float: left; // float: left;
height: 50px !important; // height: 50px !important;
line-height: 50px !important; // line-height: 70px !important;
color: #999093 !important; // color: #999093 !important;
padding: 0 5px !important; // padding: 5px 5px !important;
margin: 0 10px !important; // //margin: 0 10px !important;
// background-color: #F6F6FA;
// border-top-left-radius: 30%;
// border-top-right-radius: 30%;
// font-size: medium;
//}
//
//.topmenu-container.el-menu--horizontal > .el-menu-item.is-active, .el-menu--horizontal > .el-submenu.is-active .el-submenu__title {
// border-bottom: 2px solid transparent !important;
// background-color: #D4D9E5;
// color: #303133;
//}
//
///* submenu item */
//.topmenu-container.el-menu--horizontal > .el-submenu .el-submenu__title {
// float: left;
// height: 50px !important;
// line-height: 50px !important;
// color: #999093 !important;
// padding: 0 5px !important;
// margin: 0 10px !important;
//}
.menuStyle{
box-shadow: 0 0 8px #D4D9E5;
height: 30px;
border-bottom: transparent;
} }
.menuStyle:hover{
.topmenu-container.el-menu--horizontal > .el-menu-item.is-active, .el-menu--horizontal > .el-submenu.is-active .el-submenu__title { color: #30B08F;
border-bottom: 2px solid #{'var(--theme)'} !important; border-bottom: 0px transparent;
color: #303133;
} }
::v-deep .el-menu::before{
/* submenu item */ color: transparent;
.topmenu-container.el-menu--horizontal > .el-submenu .el-submenu__title { }
float: left; ::v-deep .el-submenu{
height: 50px !important; height: 30px;
line-height: 50px !important; }
color: #999093 !important; .el-menu-item.is-active{
padding: 0 5px !important; color: white !important;
margin: 0 10px !important; background-color: #0D8EEE !important;
}
.el-menu-item {
width: 130px;
color: #2E2E2E !important;
background-color:#F6F6FA !important;
}
.el-menu--horizontal > .el-submenu{
height: 10px;
}
.el-menu--horizontal > .el-submenu.is-active{
height: 80px;
} }
</style> </style>
<template> <template>
<div class="navbar"> <div class="navbar">
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" v-if = "false"/>
<!-- <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>-->
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/> <img src="../../assets/images/titlePic.png" alt="" style="width: 200px;height: 80px;">
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/> <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
<div class="right-menu" style="margin-top: 20px">
<div class="right-menu">
<!-- <template v-if="device!=='mobile'">-->
<!-- <search id="header-search" class="right-menu-item" />-->
<!-- <el-tooltip content="源码地址" effect="dark" placement="bottom">-->
<!-- <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />-->
<!-- </el-tooltip>-->
<!-- <el-tooltip content="文档地址" effect="dark" placement="bottom">-->
<!-- <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />-->
<!-- </el-tooltip>-->
<!-- <screenfull id="screenfull" class="right-menu-item hover-effect" />-->
<!-- <el-tooltip content="布局大小" effect="dark" placement="bottom">-->
<!-- <size-select id="size-select" class="right-menu-item hover-effect" />-->
<!-- </el-tooltip>-->
<!-- </template>-->
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click"> <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<img :src="avatar" class="user-avatar"> <img :src="avatar" class="user-avatar">
...@@ -113,13 +93,12 @@ export default { ...@@ -113,13 +93,12 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.navbar { .navbar {
display: flex; display: flex;
height: 50px; height: 80px;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
background: #fff; background: #fff;
box-shadow: 0 1px 4px rgba(0,21,41,.08); box-shadow: 0 1px 4px rgba(0,21,41,.08);
justify-content: space-between; justify-content: space-between;
.hamburger-container { .hamburger-container {
line-height: 46px; line-height: 46px;
height: 100%; height: 100%;
...@@ -138,6 +117,9 @@ export default { ...@@ -138,6 +117,9 @@ export default {
} }
.topmenu-container { .topmenu-container {
margin-top:30px ;
//margin-left: -10px;
//height: 80px;
//position: absolute; //position: absolute;
//left: 50px; //left: 50px;
} }
......
...@@ -108,6 +108,6 @@ export default { ...@@ -108,6 +108,6 @@ export default {
width: 100%; width: 100%;
} }
.app-wrapper{ .app-wrapper{
background: gray; background: #D4D9E5;
} }
</style> </style>
This diff is collapsed.
This diff is collapsed.
...@@ -193,7 +193,7 @@ export default { ...@@ -193,7 +193,7 @@ export default {
top: 50%; top: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
width: 800px; width: 800px;
height: 500px; height: 490px;
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
display: flex; display: flex;
...@@ -204,7 +204,8 @@ export default { ...@@ -204,7 +204,8 @@ export default {
width: 375px; width: 375px;
height: 500px; height: 500px;
background: #388fff; background-image: url("../../src/assets/images/bgImg.png");
background-size: contain;
} }
.login-right { .login-right {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment