主题样式

duhanyu
许宏杰 2 years ago
parent fff3e56d02
commit 66ffa97291

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

@ -127,6 +127,10 @@ aside {
padding: 20px; padding: 20px;
height: 100%; height: 100%;
width: 100%; width: 100%;
background: #fff;
box-shadow: 0px 0px 15px 0px rgba(229, 212, 212, 0.58);
border-radius: 8px;
overflow-y: auto;
} }
.components-container { .components-container {

@ -86,7 +86,13 @@
} }
& .theme-dark .is-active > .el-submenu__title { & .theme-dark .is-active > .el-submenu__title {
color: $base-menu-color-active !important; // color: $base-menu-color-active !important;
color: #fff !important;
background-color: #f23f4a !important;
}
& .theme-dark .is-active > .el-submenu__title i {
// color: $base-menu-color-active !important;
color: #fff !important;
} }
& .nest-menu .el-submenu > .el-submenu__title, & .nest-menu .el-submenu > .el-submenu__title,
@ -100,10 +106,13 @@
& .theme-dark .nest-menu .el-submenu > .el-submenu__title, & .theme-dark .nest-menu .el-submenu > .el-submenu__title,
& .theme-dark .el-submenu .el-menu-item { & .theme-dark .el-submenu .el-menu-item {
background-color: $base-sub-menu-background !important; // background-color: $base-sub-menu-background !important;
background-color: #faf7f7;
&:hover { &:hover {
background-color: $base-sub-menu-hover !important; // background-color: $base-sub-menu-hover !important;
color: #f8414d !important;
background-color: rgba(255, 72, 83, 0.2) !important;
} }
} }
} }

@ -1,25 +1,25 @@
// base color // base color
$blue:#324157; $blue: #324157;
$light-blue:#3A71A8; $light-blue: #3a71a8;
$red:#C03639; $red: #c03639;
$pink: #E65D6E; $pink: #e65d6e;
$green: #30B08F; $green: #30b08f;
$tiffany: #4AB7BD; $tiffany: #4ab7bd;
$yellow:#FEC171; $yellow: #fec171;
$panGreen: #30B08F; $panGreen: #30b08f;
// //
$base-menu-color:#bfcbd9; $base-menu-color: #4c4949;
$base-menu-color-active:#f4f4f5; $base-menu-color-active: #f4f4f5;
$base-menu-background:#304156; $base-menu-background: #304156;
$base-logo-title-color: #ffffff; $base-logo-title-color: #ffffff;
$base-menu-light-color:rgba(0,0,0,.70); $base-menu-light-color: rgba(0, 0, 0, 0.7);
$base-menu-light-background:#ffffff; $base-menu-light-background: #ffffff;
$base-logo-light-title-color: #001529; $base-logo-light-title-color: #001529;
$base-sub-menu-background:#1f2d3d; $base-sub-menu-background: #1f2d3d;
$base-sub-menu-hover:#001528; $base-sub-menu-hover: #001528;
// //
/** /**
@ -50,5 +50,5 @@ $base-sidebar-width: 200px;
subMenuHover: $base-sub-menu-hover; subMenuHover: $base-sub-menu-hover;
sideBarWidth: $base-sidebar-width; sideBarWidth: $base-sidebar-width;
logoTitleColor: $base-logo-title-color; logoTitleColor: $base-logo-title-color;
logoLightTitleColor: $base-logo-light-title-color logoLightTitleColor: $base-logo-light-title-color;
} }

@ -10,26 +10,27 @@
</template> </template>
<script> <script>
import iframeToggle from "./IframeToggle/index" import iframeToggle from "./IframeToggle/index";
export default { export default {
name: 'AppMain', name: "AppMain",
components: { iframeToggle }, components: { iframeToggle },
computed: { computed: {
cachedViews() { cachedViews() {
return this.$store.state.tagsView.cachedViews return this.$store.state.tagsView.cachedViews;
}, },
key() { key() {
return this.$route.path return this.$route.path;
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.app-main { .app-main {
/* 50= navbar 50 */ /* 50= navbar 50 */
min-height: calc(100vh - 50px); // min-height: calc(100vh - 50px);
height: 100% !important;
width: 100%; width: 100%;
position: relative; position: relative;
overflow: hidden; overflow: hidden;

@ -41,7 +41,8 @@ export default {
// @import "@/assets/styles/element-variables.scss"; // @import "@/assets/styles/element-variables.scss";
.header-container { .header-container {
height: 60px; height: 60px;
background: linear-gradient(90deg, #f8414d, #dc393e); background: url("~@/assets/images/title-bg@2x.png");
background-size: cover;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;

@ -1,26 +1,42 @@
<template> <template>
<div :class="{'has-logo':showLogo}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }"> <div
<logo v-if="showLogo" :collapse="isCollapse" /> :class="{ 'has-logo': showLogo }"
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper"> :style="{
<el-menu backgroundColor:
:default-active="activeMenu" settings.sideTheme === 'theme-dark'
:collapse="isCollapse" ? 'transparent'
:background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground" : variables.menuLightBackground,
:text-color="settings.sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor" }"
:unique-opened="true" >
:active-text-color="settings.theme" <logo v-if="showLogo" :collapse="isCollapse" />
:collapse-transition="false" <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
mode="vertical" <el-menu
> :default-active="activeMenu"
<sidebar-item :collapse="isCollapse"
v-for="(route, index) in sidebarRouters" :background-color="
:key="route.path + index" settings.sideTheme === 'theme-dark'
:item="route" ? 'transparent'
:base-path="route.path" : variables.menuLightBackground
/> "
</el-menu> :text-color="
</el-scrollbar> settings.sideTheme === 'theme-dark'
</div> ? variables.menuColor
: variables.menuLightColor
"
:unique-opened="true"
:active-text-color="'#F23F4A'"
:collapse-transition="false"
mode="vertical"
>
<sidebar-item
v-for="(route, index) in sidebarRouters"
:key="route.path + index"
:item="route"
:base-path="route.path"
/>
</el-menu>
</el-scrollbar>
</div>
</template> </template>
<script> <script>
@ -30,28 +46,28 @@ import SidebarItem from "./SidebarItem";
import variables from "@/assets/styles/variables.scss"; import variables from "@/assets/styles/variables.scss";
export default { export default {
components: { SidebarItem, Logo }, components: { SidebarItem, Logo },
computed: { computed: {
...mapState(["settings"]), ...mapState(["settings"]),
...mapGetters(["sidebarRouters", "sidebar"]), ...mapGetters(["sidebarRouters", "sidebar"]),
activeMenu() { activeMenu() {
const route = this.$route; const route = this.$route;
const { meta, path } = route; const { meta, path } = route;
// if set path, the sidebar will highlight the path you set // if set path, the sidebar will highlight the path you set
if (meta.activeMenu) { if (meta.activeMenu) {
return meta.activeMenu; return meta.activeMenu;
} }
return path; return path;
}, },
showLogo() { showLogo() {
return this.$store.state.settings.sidebarLogo; return this.$store.state.settings.sidebarLogo;
}, },
variables() { variables() {
return variables; return variables;
}, },
isCollapse() { isCollapse() {
return !this.sidebar.opened; return !this.sidebar.opened;
} },
} },
}; };
</script> </script>

@ -106,8 +106,12 @@ export default {
align-items: center; align-items: center;
.left-sidebar { .left-sidebar {
height: 100%; height: 100%;
background: url("~@/assets/images/sidebar.png");
background-size: cover;
} }
.right-page { .right-page {
background: #f5f5f5;
padding: 13px;
height: 100%; height: 100%;
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;

Loading…
Cancel
Save