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

@ -9,12 +9,12 @@ $yellow: #fec171;
$panGreen: #30b08f; $panGreen: #30b08f;
// //
$base-menu-color: #806e6e; $base-menu-color: #4C4949;
$base-menu-color-active: #f4f4f5; $base-menu-color-active: #f4f4f5;
$base-menu-background: #304156; $base-menu-background: #fff;
$base-logo-title-color: #ffffff; $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-menu-light-background: #ffffff;
$base-logo-light-title-color: #001529; $base-logo-light-title-color: #001529;

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

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

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

Loading…
Cancel
Save