Browse Source

feat: 布局调整

王家程 3 years ago
parent
commit
470b1a574e

+ 5 - 5
src/layouts/DefaultLayout/DefaultHeader/index.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: WangJiaCheng
  * @Date: 2021-05-06 17:52:07
- * @LastEditors: WangJiaCheng
- * @LastEditTime: 2021-08-19 16:42:20
+ * @LastEditors: wjc
+ * @LastEditTime: 2021-09-24 11:00:02
  * @Description:
 -->
 <template>
@@ -31,14 +31,14 @@ export default {
   .layout-header {
     display: flex;
     justify-content: space-between;
+    z-index: 102;
+    margin-bottom: 2px;
     width: 100%;
     background-color: #fff;
-    // border-bottom: 1px solid #dcdee2;
-    box-shadow: 0 2px 4px rgba(0,0,0, .1);
+    box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
     color: #333;
     line-height: 60px;
     text-align: right;
-    z-index: 101;
     .name {
       margin-right: 8px;
     }

+ 12 - 21
src/layouts/DefaultLayout/index.vue

@@ -2,23 +2,19 @@
  * @Author: WangJiaCheng
  * @Date: 2021-05-06 17:24:30
  * @LastEditors: wjc
- * @LastEditTime: 2021-09-18 09:37:37
+ * @LastEditTime: 2021-09-24 11:00:05
  * @Description:
 -->
 <template>
-  <el-container class="default-layout">
-    <el-container class="is-vertical">
-      <default-header />
-      <el-main class="layout-main">
-        <!-- <default-side /> -->
-        <div style="width: 100%">
-          <keep-alive>
-            <router-view :key="$route.fullPath" />
-          </keep-alive>
-        </div>
-      </el-main>
-    </el-container>
-  </el-container>
+  <div class="default-layout">
+    <default-header />
+    <div class="layout-main">
+      <!-- <default-side /> -->
+      <keep-alive>
+        <router-view :key="$route.fullPath" />
+      </keep-alive>
+    </div>
+  </div>
 </template>
 
 <script>
@@ -31,13 +27,7 @@ export default {
     DefaultSide
   },
   data() {
-    const item = {
-      date: '2016-05-02',
-      name: '王小虎',
-      address: '上海市普陀区金沙江路 1518 弄'
-    }
     return {
-      tableData: Array(20).fill(item)
     }
   }
 }
@@ -56,7 +46,8 @@ export default {
     width: 100%;
     display: flex;
     justify-content: space-between;
-    /* height: calc(100% - 60px); */
+    height: calc(100% - 60px);
+    overflow: scroll;
     padding: 0;
     background: #fff;
   }

+ 2 - 0
src/styles/index.less

@@ -5,6 +5,7 @@ body, html{
   margin: 0;
   padding: 0;
   background: #fff;
+  overflow: hidden;
   -moz-osx-font-smoothing: grayscale;
   -webkit-font-smoothing: antialiased;
   text-rendering: optimizeLegibility;
@@ -13,6 +14,7 @@ body, html{
 
 #app {
   height: 100%;
+  width: 100%;
 }
 
 input, textarea{