Browse Source

table表头滚动条样式优化

zhuth 6 years ago
parent
commit
111825c237

+ 1 - 1
src/components/admin/userGroupManagement.less

@@ -76,7 +76,7 @@
                         .ant-table-content {
                             .ant-table-scroll {
                                 .ant-table-header {
-                                    margin-bottom: -20px !important;
+                                    margin-bottom: -10px !important;
                                 }
                                 .ant-table-body {
                                     overflow-x: hidden !important;

+ 2 - 2
src/components/chartDesigner/charts/tableView.jsx

@@ -8,7 +8,7 @@ class TableView extends React.Component {
     constructor(props) {
         super(props);
         this.state = {
-            columnWidth: 150,
+            columnWidth: 200,
             tableHeaderHeight: 60,
         };
     }
@@ -66,7 +66,7 @@ class TableView extends React.Component {
                             return {
                                 style: {
                                     whiteSpace: 'nowrap',
-                                    maxWidth: columnWidth,
+                                    maxWidth: columnWidth + 'px',
                                 }
                             }
                         };

+ 1 - 1
src/components/dashboard/list.less

@@ -80,7 +80,7 @@
                         }
                     }
                     .ant-table-body {
-                        margin-top: 10px;
+                        margin-top: 0;
                         overflow-y: auto !important;
                         table {
                             padding: 0;

+ 1 - 1
src/components/dataSource/list.less

@@ -85,7 +85,7 @@
                         }
                     }
                     .ant-table-body {
-                        margin-top: 10px;
+                        margin-top: 0px;
                         overflow-y: auto !important;
                         table {
                             padding: 0;

+ 17 - 0
src/themes/default/base.less

@@ -36,6 +36,7 @@
 // Table
 .ant-table-body {
     margin-top: 10px;
+    overflow: auto !important;
 }
 .ant-table-small > .ant-table-content > .ant-table-body {
     margin: 0;
@@ -50,6 +51,22 @@
     height: 40px;
     background: #D6EEFE;
 }
+.ant-table-fixed-header .ant-table-scroll .ant-table-header {
+    overflow: hidden;
+    margin-bottom: 0 !important;
+    margin-right: 10px;
+    background: #D6EEFD;
+    &:after {
+        content: ' ';
+        position: absolute;
+        height: 41px;
+        width: 11px;
+        right: 0;
+        top: 0px;
+        background: #D6EEFD;
+        border-bottom: 1px solid #e8e8e8;
+    }
+}
 
 // ListFilter
 .list-filter .ant-select:first-child .ant-select-selection.ant-select-selection--single {