Pārlūkot izejas kodu

表格增加滚动条

dongjh 7 mēneši atpakaļ
vecāks
revīzija
4d8615ae4e

+ 1 - 33
src/views/module_interLock/InterlockSummary/InterlockSummaryList.vue

@@ -86,7 +86,7 @@
         size="middle"
         bordered
         rowKey="id"
-        :scroll="{ y: 'calc(75vh - 85px)' }"
+        :scroll="{ x:'calc(145vh - 85px)', y: 'calc(75vh - 85px)' }"
         :columns="columns"
         :dataSource="dataSource"
         :pagination="ipagination"
@@ -790,36 +790,4 @@
   /deep/.ant-table-thead > tr > th {
     text-align: center; 
   }
-  //表格滚动条
-/deep/.ant-table-body {
-  overflow-x: hidden;
-  &::-webkit-scrollbar {
-    /*滚动条整体样式*/
-    width: 5px;
-    height: 1px;
-  }
- 
-  &::-webkit-scrollbar-thumb {
-    /*滚动条里面的滑块*/
-    border-radius: 5px;
-    background: rgba(100, 177, 240, 0.5);
-  }
- 
-  &::-webkit-scrollbar-track {
-    /*滚动条里面轨道背景*/
-    border-radius: 5px;
-    background: rgba(0, 0, 0, 0.1);
-  }
-}
-.ant-table-tbody > tr > td {
-  white-space: break-spaces;
-}
-/deep/.ant-table-fixed-header > .ant-table-content > .ant-table-scroll > .ant-table-body {
-  overflow-y: auto !important;
-}
-// /deep/ .ant-table-fixed-left .ant-table-body-outer .ant-table-body-inner {
-
-//   max-height: calc(40vh - 412px) !important;
-
-// }
 </style>

+ 3 - 2
src/views/module_interLock/interlockHistoryData/InterlockHistoryList.vue

@@ -77,7 +77,7 @@
       <a-table
         ref="table"
         size="middle"
-        :scroll="{x:true}"
+        :scroll="{ x:'calc(145vh - 85px)', y: 'calc(75vh - 85px)' }"
         bordered
         rowKey="id"
         :columns="columns"
@@ -219,7 +219,8 @@
           },
           {
             title:'联锁名称',
-            // align:"left",
+            // align:"left",            
+            width: 300,
             dataIndex: 'interlockname',
             // customRender:(t,record,index)=> {
             //   return {children: record.interlockname,attrs: {rowSpan:record.rowSpan4}};