wandequan 2 роки тому
батько
коміт
3a04d1f9bc

+ 23 - 19
src/components/breadcrumb/iotBreadcrumb.vue

@@ -2,9 +2,11 @@
   <div class="home-breadcrumb border-shadow">
     <a-breadcrumb>
       <a-breadcrumb-item @click="toHome">首页</a-breadcrumb-item>
-      <a-breadcrumb-item v-for="item in levelList" :key="item.name">{{ item.meta.breadcrumb }}</a-breadcrumb-item>
+      <a-breadcrumb-item v-for="item in levelList" :key="item.name">{{
+        item.meta.breadcrumb
+      }}</a-breadcrumb-item>
     </a-breadcrumb>
-    <br>
+    <br />
   </div>
 </template>
 
@@ -12,39 +14,41 @@
 export default {
   data() {
     return {
-      levelList: []
-    }
+      levelList: [],
+    };
   },
   watch: {
     $route(route) {
-      this.getBreadcrumb()
-    }
+      this.getBreadcrumb();
+    },
   },
   created() {
-    this.getBreadcrumb()
+    this.getBreadcrumb();
   },
   methods: {
     getBreadcrumb() {
-      this.levelList = []
-      let arr = this.$route.matched
+      this.levelList = [];
+      let arr = this.$route.matched;
       for (let i = 1; i < arr.length; i++) {
-        this.levelList.push(arr[i])
+        this.levelList.push(arr[i]);
       }
     },
     toHome() {
-      this.$router.push('home');
+      this.$router.push("home");
     },
     handleLink(item) {
-      let path = item
-      this.$router.push(path)
-    }
-  }
-}
+      let path = item;
+      this.$router.push(path);
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
-.home-breadcrumb { 
-  height: 25px;
-  margin: 10px 0px 10px 0px;
+.home-breadcrumb {
+  height: 40px; 
+  margin: 10px 10px;
+  padding: 10px 0px;
+  padding-left: 20px;
 }
 </style>

+ 5 - 6
src/style/common.css

@@ -2,16 +2,15 @@
   width: calc(100% - 220px);
   height: 100%;
   display: inline-block;
-  padding-left: 8px;
-  padding-right: 8px;
-  overflow-y: auto;
+
 }
 
 .pageContainer-content {
   width: 100%;
-  height: calc(100% - 25px - 20px - 8px - 2px);
-  border: 1px solid #e7eaf1;
-  padding: 8px 2px 2px 10px;
+  height: calc(100% - 60px);
+  padding: 5px 10px;
+  overflow: hidden;
+  overflow-y: auto;
 }
 
 .ant-btn {

+ 4 - 1
src/views/HomeView.vue

@@ -5,7 +5,7 @@
       <a-layout-header class="header">
         <HomeHeader :collapse.sync="collapse" :is-login="true" />
       </a-layout-header>
-      <a-layout>
+      <a-layout class="main_body">
         <a-layout-sider
           v-model="collapse"
           :trigger="null"
@@ -76,6 +76,9 @@ export default {
     padding: 0;
     line-height: 60px;
   }
+  .main_body{
+    height:calc(100vh - 60px);
+  }
 
   .home-page {
     display: inline-block;