格式化代码

This commit is contained in:
不做码农
2022-04-21 21:58:50 +08:00
parent ebbb109c75
commit fd33cd5f85
8 changed files with 395 additions and 339 deletions
+24 -9
View File
@@ -1,16 +1,28 @@
<template>
<div class="layout-sidebar__container" :class="{ 'has-logo': showLogo }"
:style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
<div
class="layout-sidebar__container"
:class="{ 'has-logo': showLogo }"
:style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }"
>
<logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar :class="sideTheme" wrap-class="scrollbar-wrapper">
<el-menu :default-active="activeMenu" :collapse="isCollapse"
<el-menu
:default-active="activeMenu"
:collapse="isCollapse"
:background-color="sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
:text-color="sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor" :unique-opened="true" :active-text-color="theme"
:collapse-transition="false" mode="vertical">
<sidebar-item v-for="(route, index) in sidebarRouters" :key="route.path + index" :item="route" :base-path="route.path" />
:text-color="sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor"
:unique-opened="true"
:active-text-color="theme"
: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>
@@ -42,6 +54,7 @@ const activeMenu = computed(() => {
<style lang="scss">
@import '@/assets/styles/variables.module.scss';
.layout-sidebar__container {
transition: width 0.28s;
width: $base-sidebar-width !important;
@@ -58,9 +71,11 @@ const activeMenu = computed(() => {
.scrollbar-wrapper {
overflow-x: hidden;
}
.el-scrollbar {
flex: 1;
}
.el-scrollbar__bar.is-vertical {
right: 0px;
}
@@ -99,4 +114,4 @@ const activeMenu = computed(() => {
}
}
}
</style>
</style>