瀏覽代碼

feat: 替换layout布局下的Table全局样式

lanjianrong 4 年之前
父節點
當前提交
8ff11f3d41

+ 15 - 0
src/layout/NavSide/index.module.scss

@@ -0,0 +1,15 @@
+.layout {
+  :global(.ant-table-thead .ant-table-cell) {
+    padding: 0.4rem;
+    text-align: center !important;
+    background-color: #e9ecef;
+    border-right: 1px solid #dee2e6;
+    border-bottom: 2px solid #dee2e6;
+  }
+  :global(.ant-table-tbody .ant-table-cell) {
+    padding: 0.4rem;
+  }
+  :global(.ant-table.ant-table-bordered > .ant-table-container > .ant-table-content > table > thead > tr > th) {
+    border-right: 1px solid #dee2e6;
+  }
+}

+ 2 - 1
src/layout/NavSide/index.tsx

@@ -4,6 +4,7 @@ import { iMenuItem, RouteModel } from "@/types/router"
 import { combinationPath } from "@/utils/util"
 import React from 'react'
 import { Switch } from 'react-router-dom'
+import styles from './index.module.scss'
 export default function NavSide(props: any) {
   const { routeConfig, match } = props
 
@@ -14,7 +15,7 @@ export default function NavSide(props: any) {
   return (
     <div className="pi-flex-row pi-height-100P">
       <Menu list={menuList}></Menu>
-      <div className="pi-flex-row pi-height-100P">
+      <div className={[ 'pi-flex-row', 'pi-height-100P', styles.layout ].join(' ')}>
         <Switch>
           <Guards routeConfig={routeConfig} match={match}></Guards>
         </Switch>

+ 11 - 11
src/pages/Contract/Content/Income/components/TableContent/index.module.scss

@@ -12,17 +12,17 @@
     width: 100%;
     height: 62%;
     overflow: hidden;
-    :global(.ant-table-tbody > tr > td) {
-      padding: 0.3rem;
-    }
-    :global(.ant-table-thead > tr > th) {
-      padding: 0.3rem;
-      color: #000000;
-      text-align: center;
-      background: #e9ecef;
-      border-bottom: 2px solid #dee2e6;
-      border-bottom-width: 2px;
-    }
+    // :global(.ant-table-tbody > tr > td) {
+    //   padding: 0.3rem;
+    // }
+    // :global(.ant-table-thead > tr > th) {
+    //   padding: 0.3rem;
+    //   color: #000000;
+    //   text-align: center;
+    //   background: #e9ecef;
+    //   border-bottom: 2px solid #dee2e6;
+    //   border-bottom-width: 2px;
+    // }
   }
   .extraControl {
     width: 100%;

+ 13 - 13
src/pages/Contract/List/index.module.scss

@@ -13,19 +13,19 @@
     }
   }
 
-  :global(.ant-table-thead .ant-table-cell) {
-    padding: 0.4rem;
-    text-align: center !important;
-    background-color: #e9ecef;
-    border-right: 1px solid #dee2e6;
-    border-bottom: 2px solid #dee2e6;
-  }
-  :global(.ant-table-tbody .ant-table-cell) {
-    padding: 0.4rem;
-  }
-  :global(.ant-table.ant-table-bordered > .ant-table-container > .ant-table-content > table > thead > tr > th) {
-    border-right: 1px solid #dee2e6;
-  }
+  // :global(.ant-table-thead .ant-table-cell) {
+  //   padding: 0.4rem;
+  //   text-align: center !important;
+  //   background-color: #e9ecef;
+  //   border-right: 1px solid #dee2e6;
+  //   border-bottom: 2px solid #dee2e6;
+  // }
+  // :global(.ant-table-tbody .ant-table-cell) {
+  //   padding: 0.4rem;
+  // }
+  // :global(.ant-table.ant-table-bordered > .ant-table-container > .ant-table-content > table > thead > tr > th) {
+  //   border-right: 1px solid #dee2e6;
+  // }
 }
 
 .textBtn {

+ 13 - 0
src/pages/Management/Setting/index.module.scss

@@ -7,4 +7,17 @@
     color: #28a745;
     border-color: #28a745;
   }
+  :global(.ant-table-thead .ant-table-cell) {
+    padding: 0.4rem;
+    text-align: center;
+    background-color: #e9ecef;
+    border-right: 1px solid #dee2e6;
+    border-bottom: 2px solid #dee2e6;
+  }
+  :global(.ant-table-tbody .ant-table-cell) {
+    padding: 0.4rem;
+  }
+  :global(.ant-table.ant-table-bordered > .ant-table-container > .ant-table-content > table > thead > tr > th) {
+    border-right: 1px solid #dee2e6;
+  }
 }

+ 0 - 14
src/pages/Management/Tender/index.module.scss

@@ -12,18 +12,4 @@
       background-color: #007bff;
     }
   }
-
-  :global(.ant-table-thead .ant-table-cell) {
-    padding: 0.4rem;
-    text-align: center;
-    background-color: #e9ecef;
-    border-right: 1px solid #dee2e6;
-    border-bottom: 2px solid #dee2e6;
-  }
-  :global(.ant-table-tbody .ant-table-cell) {
-    padding: 0.4rem;
-  }
-  :global(.ant-table.ant-table-bordered > .ant-table-container > .ant-table-content > table > thead > tr > th) {
-    border-right: 1px solid #dee2e6;
-  }
 }