qianlishi 3 лет назад
Родитель
Сommit
5d531557c7
1 измененных файлов с 32 добавлено и 14 удалено
  1. 32 14
      report-ui/src/views/layout/components/Sidebar/index.vue

+ 32 - 14
report-ui/src/views/layout/components/Sidebar/index.vue

@@ -3,36 +3,47 @@
     <div class="admin-title" @click="goBigScreen">
       <img src="../../../../../static/logo-dp.png" width="50" class="mt10" />
     </div>
-    <el-menu :show-timeout="200" :default-active="$route.path" :collapse="isCollapse" mode="vertical">
-      <sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path" />
+    <el-menu
+      :show-timeout="200"
+      :default-active="$route.path"
+      :collapse="isCollapse"
+      mode="vertical"
+    >
+      <sidebar-item
+        v-for="route in routes"
+        :key="route.path"
+        :item="route"
+        :base-path="route.path"
+      />
     </el-menu>
+    <div class="version">V0.9.5</div>
   </el-scrollbar>
 </template>
 
 <script>
-import { mapGetters } from 'vuex'
-import SidebarItem from './SidebarItem'
+import { mapGetters } from "vuex";
+import SidebarItem from "./SidebarItem";
 
 export default {
   components: { SidebarItem },
   computed: {
-    ...mapGetters(['sidebar']),
+    ...mapGetters(["sidebar"]),
     routes() {
-      return this.$router.options.routes
+      return this.$router.options.routes;
     },
     isCollapse() {
-      return !this.sidebar.opened
-    },
+      return !this.sidebar.opened;
+    }
   },
   methods: {
     goBigScreen() {
       let routeUrl = this.$router.resolve({
-        path: '/report/bigScreen',
-      })
-      window.open(routeUrl.href, '_blank')
-    },
-  },
-}
+        path: "/report/bigScreen"
+      });
+      window.open(routeUrl.href, "_blank");
+    }
+  }
+};
 </script>
 
 <style lang="scss" scoped>
@@ -49,4 +60,11 @@ export default {
 .admin-title:hover {
   cursor: pointer;
 }
+.version {
+  color: #999;
+  position: absolute;
+  bottom: 10px;
+  font-size: 16px;
+  margin-left: 10px;
+}
 </style>