Bläddra i källkod

修改整体布局

tengmingxue 3 år sedan
förälder
incheckning
d513686ebf
2 ändrade filer med 21 tillägg och 21 borttagningar
  1. 8 8
      src/layout/components/Footer/index.vue
  2. 13 13
      src/layout/index.vue

+ 8 - 8
src/layout/components/Footer/index.vue

@@ -35,16 +35,16 @@ export default {
 </script>
 <style lang='scss' scoped>
 .footer {
-  width: 100%;
-  min-width: 1200px;
-  height: 110px;
-  background: #ddecf9;
-  position: fixed;
-  bottom: 0px;
+    width: 100%;
+    min-width: 1200px;
+    height: 130px;
+    background: #ddecf9;
+    position: relative;
+    padding: 10px 0;
   .container{
-    position: fixed;
     width: 1200px;
-    left: calc(50% - 600px);
+    margin: 0 auto;
+    position: relative;
   }
 }
 </style>

+ 13 - 13
src/layout/index.vue

@@ -3,7 +3,9 @@
     <div :class="classObj" class="app-wrapper">
       <Header v-if="showHeader" :class="{'fixed-header-tow': showHeader}" />
       <div v-if="!showMainPage" class="tf-main-container">
-        <sidebar class="sidebar-container" :style="{'top': showHeader ? '30px' : ''}" />
+        <div class="tf-sidebar-container">
+          <sidebar class="sidebar-container" :style="{'top': showHeader ? '0px' : ''}" />
+        </div>
         <div id="main-container" class="main-container">
           <!-- <div :class="{'fixed-header':fixedHeader}">
             <navbar v-if="showNavBar" />
@@ -145,26 +147,27 @@ export default {
     height: 100%;
     width: 100%;
     &.mobile.openSidebar{
-      position: fixed;
+      position: relative;
       top: 0;
     }
     .tf-main-container{
       width: 1200px;
-      position: fixed;
-      top: 124px;
-      left: calc(50% - 600px);
+      margin: 0 auto;
+      padding: 30px 0;
+      overflow: hidden;
+      .tf-sidebar-container{
+        position:absolute;
+        float: left;
+        width: 260px;
+      }
       .tf-separator-class{
-        top: 30px;
-        position: relative;
         height: 40px;
-        line-height: 30px;
+        line-height: 40px;
         padding: 10px 30px;
       }
     }
     .tf-main{
       width: 100%;
-      position: fixed;
-      top: 124px;
     }
   }
   .drawer-bg {
@@ -187,10 +190,7 @@ export default {
     transition: width 0.28s;
   }
   .fixed-header-tow{
-    position: fixed;
-    top: 0;
     width: 100%;
-    // right: 0;
     z-index: 9;
   }