소스 검색

fix global style

Michael Wang 6 년 전
부모
커밋
87d2111007
4개의 변경된 파일26개의 추가작업 그리고 4개의 파일을 삭제
  1. 8 1
      src/modules/portal/views/home/Home.vue
  2. 3 2
      src/modules/portal/views/home/HomeMain.vue
  3. 1 1
      src/modules/portal/views/home/HomeSide.vue
  4. 14 0
      src/styles/global.css

+ 8 - 1
src/modules/portal/views/home/Home.vue

@@ -31,7 +31,7 @@
       <HomeSide v-if="ifShowHomeSide" :key="sideKey" />
       <el-container class="main-body">
         <router-view></router-view>
-        <el-footer>&copy; 启明泰和 2019</el-footer>
+        <el-footer class="footer">&copy; 启明泰和 2019</el-footer>
       </el-container>
     </el-container>
 
@@ -244,6 +244,13 @@ body > .el-container {
 
 .main-body {
   min-height: calc(100vh - 60px);
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+}
+
+.footer {
+  justify-self: flex-end;
 }
 </style>
 

+ 3 - 2
src/modules/portal/views/home/HomeMain.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-main>
+  <el-main style="display: flex; align-items: center">
     <div class="main-content">
       <div
         class="module-card"
@@ -63,6 +63,7 @@ export default {
   justify-items: center; */
   /* justify-content: space-between; */
   /* align-content: space-between; */
+  justify-content: center;
 
   height: 100%;
 }
@@ -70,7 +71,7 @@ export default {
 .module-card {
   width: 200px;
   height: 150px;
-  margin-bottom: 20px;
+  margin-bottom: 50px;
   margin-right: 20px;
   cursor: pointer;
   background-color: white;

+ 1 - 1
src/modules/portal/views/home/HomeSide.vue

@@ -126,7 +126,7 @@ export default {
 
 <style scoped>
 .el-menu-vertical-demo {
-  height: calc(100vh - 60px);
+  height: calc(100vh - 60px - 70px);
 }
 .el-aside {
   background-color: #545c64;

+ 14 - 0
src/styles/global.css

@@ -98,3 +98,17 @@ body {
   color: #444444;
   background-color: #ffffff;
 }
+
+.center-block {
+  display: block;
+  margin-right: auto;
+  margin-left: auto;
+}
+
+.pull-right {
+  float: right !important;
+}
+
+.pull-left {
+  float: left !important;
+}