jinhui.wang

增加版本号展示,修改变量名

1 <template> 1 <template>
2 - <div :class="{'has-logo':showLogo}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }"> 2 + <div
3 - <logo v-if="showLogo" :collapse="isCollapse" /> 3 + :class="{ 'has-logo': showLogo }"
4 - <!-- <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper"> --> 4 + :style="{
5 - <el-menu 5 + backgroundColor:
6 - :default-active="activeMenu" 6 + settings.sideTheme === 'theme-dark'
7 - :collapse="isCollapse" 7 + ? variables.menuBg
8 - :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg" 8 + : variables.menuLightBg,
9 - :text-color="settings.sideTheme === 'theme-dark' ? variables.menuText : 'rgba(0,0,0,.65)'" 9 + }"
10 - :unique-opened="true" 10 + >
11 - :active-text-color="settings.theme" 11 + <logo v-if="showLogo" :collapse="isCollapse" />
12 - :collapse-transition="false" 12 + <!-- <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper"> -->
13 - mode="vertical" 13 + <el-menu
14 - > 14 + :default-active="activeMenu"
15 - <sidebar-item 15 + :collapse="isCollapse"
16 - v-for="(route, index) in sidebarRouters" 16 + :background-color="
17 - :key="route.path + index" 17 + settings.sideTheme === 'theme-dark'
18 - :item="route" 18 + ? variables.menuBg
19 - :base-path="route.path" 19 + : variables.menuLightBg
20 - /> 20 + "
21 - </el-menu> 21 + :text-color="
22 - <!-- </el-scrollbar> --> 22 + settings.sideTheme === 'theme-dark'
23 - </div> 23 + ? variables.menuText
24 + : 'rgba(0,0,0,.65)'
25 + "
26 + :unique-opened="true"
27 + :active-text-color="settings.theme"
28 + :collapse-transition="false"
29 + mode="vertical"
30 + >
31 + <sidebar-item
32 + v-for="(route, index) in sidebarRouters"
33 + :key="route.path + index"
34 + :item="route"
35 + :base-path="route.path"
36 + />
37 + </el-menu>
38 + <div class="version">version:0.5.1</div>
39 + <!-- </el-scrollbar> -->
40 + </div>
24 </template> 41 </template>
25 42
26 <script> 43 <script>
...@@ -30,28 +47,39 @@ import SidebarItem from "./SidebarItem"; ...@@ -30,28 +47,39 @@ import SidebarItem from "./SidebarItem";
30 import variables from "@/assets/styles/variables.scss"; 47 import variables from "@/assets/styles/variables.scss";
31 48
32 export default { 49 export default {
33 - components: { SidebarItem, Logo }, 50 + components: { SidebarItem, Logo },
34 - computed: { 51 + computed: {
35 - ...mapState(["settings"]), 52 + ...mapState(["settings"]),
36 - ...mapGetters(["sidebarRouters", "sidebar"]), 53 + ...mapGetters(["sidebarRouters", "sidebar"]),
37 - activeMenu() { 54 + activeMenu() {
38 - const route = this.$route; 55 + const route = this.$route;
39 - const { meta, path } = route; 56 + const { meta, path } = route;
40 - // if set path, the sidebar will highlight the path you set 57 + // if set path, the sidebar will highlight the path you set
41 - if (meta.activeMenu) { 58 + if (meta.activeMenu) {
42 - return meta.activeMenu; 59 + return meta.activeMenu;
43 - } 60 + }
44 - return path; 61 + return path;
45 - }, 62 + },
46 - showLogo() { 63 + showLogo() {
47 - return this.$store.state.settings.sidebarLogo; 64 + return this.$store.state.settings.sidebarLogo;
48 - }, 65 + },
49 - variables() { 66 + variables() {
50 - return variables; 67 + return variables;
51 - }, 68 + },
52 - isCollapse() { 69 + isCollapse() {
53 - return !this.sidebar.opened; 70 + return !this.sidebar.opened;
54 - } 71 + },
55 - } 72 + },
56 }; 73 };
57 </script> 74 </script>
75 +
76 +<style scoped>
77 +.version {
78 + width: 100%;
79 + font-size: 14px;
80 + color: #fff;
81 + position: absolute;
82 + left: 5px;
83 + bottom: 5px;
84 +}
85 +</style>
......
...@@ -5,7 +5,7 @@ const mimeMap = { ...@@ -5,7 +5,7 @@ const mimeMap = {
5 xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 5 xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
6 zip: 'application/zip' 6 zip: 'application/zip'
7 } 7 }
8 -// const baseURL = 'https://imacuat.zmd.apac.fedex.com/IMAC2' 8 +// const baseUrl = 'https://imacuat.zmd.apac.fedex.com/IMAC2'
9 // const baseUrl = 'http://47.103.140.98:9002' 9 // const baseUrl = 'http://47.103.140.98:9002'
10 const baseUrl = 'http://192.168.1.134:18080' 10 const baseUrl = 'http://192.168.1.134:18080'
11 export function downLoadZip(str, filename) { 11 export function downLoadZip(str, filename) {
......