lijinlong
杜函宇 2 years ago
parent 55665046e3
commit 0a0a83b224

@ -9,12 +9,12 @@ $yellow: #fec171;
$panGreen: #30b08f;
//
$base-menu-color: #806e6e;
$base-menu-color: #4C4949;
$base-menu-color-active: #f4f4f5;
$base-menu-background: #304156;
$base-menu-background: #fff;
$base-logo-title-color: #ffffff;
$base-menu-light-color: rgba(0, 0, 0, 0.7);
$base-menu-light-color: rgba(51, 30, 30, 0.7);
$base-menu-light-background: #ffffff;
$base-logo-light-title-color: #001529;

@ -11,15 +11,17 @@
v-if="onlyOneChild.meta"
:to="resolvePath(onlyOneChild.path, onlyOneChild.query)"
>
<el-menu-item
:index="resolvePath(onlyOneChild.path)"
:class="{ 'submenu-title-noDropdown': !isNest }"
>
<item
:icon="onlyOneChild.meta.icon || (item.meta && item.meta.icon)"
:title="onlyOneChild.meta.title"
/>
</el-menu-item>
<div>
<el-menu-item
:index="resolvePath(onlyOneChild.path)"
class="submenu-title-noDropdown"
>
<item
:icon="onlyOneChild.meta.icon || (item.meta && item.meta.icon)"
:title="onlyOneChild.meta.title"
/>
</el-menu-item>
</div>
</app-link>
</template>

@ -1,30 +1,14 @@
<template>
<div
:class="{ 'has-logo': showLogo }"
:style="{
backgroundColor:
settings.sideTheme === 'theme-dark'
? 'transparent'
: variables.menuLightBackground,
}"
>
<logo v-if="showLogo" :collapse="isCollapse" />
<div :class="{ 'has-logo': showLogo }">
<!-- <logo v-if="showLogo" :collapse="isCollapse" /> -->
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
<!-- :collapse="isCollapse" -->
<el-menu
:default-active="activeMenu"
:background-color="
settings.sideTheme === 'theme-dark'
? 'transparent'
: variables.menuLightBackground
"
:text-color="
settings.sideTheme === 'theme-dark'
? variables.menuColor
: variables.menuLightColor
"
:background-color="variables.menuLightBackground"
:text-color="variables.menuColor"
:unique-opened="true"
:active-text-color="'#F23F4A'"
active-text-color="#F23F4A"
:collapse-transition="false"
mode="vertical"
>
@ -52,6 +36,7 @@ export default {
...mapGetters(["sidebarRouters", "sidebar"]),
activeMenu() {
const route = this.$route;
console.log(route);
const { meta, path } = route;
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
@ -71,3 +56,6 @@ export default {
},
};
</script>
<style lang="scss" scoped>
</style>

@ -57,9 +57,9 @@ module.exports = {
sassOptions: { outputStyle: "expanded" },
},
// px to rem
postcss: {
plugins: [postcss],
},
// postcss: {
// plugins: [postcss],
// },
},
},
configureWebpack: {

Loading…
Cancel
Save