|
@@ -1,14 +1,27 @@
|
|
|
<template>
|
|
|
<div
|
|
|
- :class="{'has-logo':showLogo}"
|
|
|
- :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }"
|
|
|
+ :class="{ 'has-logo': showLogo }"
|
|
|
+ :style="{
|
|
|
+ backgroundColor:
|
|
|
+ settings.sideTheme === 'theme-dark'
|
|
|
+ ? variables.menuBackground
|
|
|
+ : variables.menuLightBackground,
|
|
|
+ }"
|
|
|
>
|
|
|
<logo v-if="showLogo" :collapse="isCollapse" />
|
|
|
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
|
|
|
<el-menu
|
|
|
:collapse="false"
|
|
|
- :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
|
|
|
- :text-color="settings.sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor"
|
|
|
+ :background-color="
|
|
|
+ settings.sideTheme === 'theme-dark'
|
|
|
+ ? variables.menuBackground
|
|
|
+ : variables.menuLightBackground
|
|
|
+ "
|
|
|
+ :text-color="
|
|
|
+ settings.sideTheme === 'theme-dark'
|
|
|
+ ? variables.menuColor
|
|
|
+ : variables.menuLightColor
|
|
|
+ "
|
|
|
:unique-opened="true"
|
|
|
:active-text-color="settings.theme"
|
|
|
:collapse-transition="false"
|
|
@@ -18,7 +31,7 @@
|
|
|
>
|
|
|
<sidebar-item
|
|
|
v-for="(route, index) in routs"
|
|
|
- :key="route.path + index"
|
|
|
+ :key="route.path + index"
|
|
|
:item="route"
|
|
|
:base-path="route.path"
|
|
|
/>
|
|
@@ -37,7 +50,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
routs: [],
|
|
|
- p: null
|
|
|
+ p: null,
|
|
|
};
|
|
|
},
|
|
|
components: { SidebarItem, Logo },
|
|
@@ -61,7 +74,7 @@ export default {
|
|
|
},
|
|
|
isCollapse() {
|
|
|
return !this.sidebar.opened;
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
// this.routs=this.sidebarRouters
|
|
@@ -78,16 +91,16 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
sidebarRoutersfun() {
|
|
|
- this.sidebarRouters.map(item => {
|
|
|
+ this.sidebarRouters.map((item) => {
|
|
|
if (item.path == this.$route.query.name) {
|
|
|
this.routs.push(item);
|
|
|
}
|
|
|
- // console.log(this.routs.length)
|
|
|
- if (this.routs.length <= 0) {
|
|
|
- window.open(`/pt`, "_self");
|
|
|
- }
|
|
|
+ // console.log(this.routs.length)
|
|
|
});
|
|
|
- }
|
|
|
- }
|
|
|
+ if (this.routs.length <= 0) {
|
|
|
+ window.open(`/pt`, "_self");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|