Parcourir la source

表格列宽度设置

zhongxiaoyu il y a 2 ans
Parent
commit
b4fa6004f8

+ 12 - 7
src/views/securityCheck/components/securityCheckTable.vue

@@ -95,9 +95,9 @@ export default {
     },
     rowClassName(index) {
       if (index.index % 2 == 0) {
-        return "warning-row";
+        return 'warning-row'
       } else {
-        return "warning-rows";
+        return 'warning-rows'
       }
     },
     editRow(row) {
@@ -118,11 +118,16 @@ export default {
   width: 100%;
   ::v-deep .ant-table {
     width: 100%;
-    .ant-table-column-title {
-      font-size: 14px;
-      font-family: Helvetica, 'Microsoft YaHei';
-      color: #101116;
-      font-weight: bold;
+    .ant-table-thead {
+      th {
+        padding: 18px 12px;
+      }
+      .ant-table-column-title {
+        font-size: 14px;
+        font-family: Helvetica, 'Microsoft YaHei';
+        color: #101116;
+        font-weight: bold;
+      }
     }
     .ant-table-tbody {
       .warning-row {

+ 12 - 6
src/views/securityCheck/views/waybillTable.vue

@@ -39,17 +39,20 @@ export default {
         {
           dataIndex: 'waybillNo',
           key: 'waybillNo',
-          title: '运单编号'
+          title: '运单编号',
+          width: 125
         },
         {
           dataIndex: 'mainWaybillNo',
           key: 'mainWaybillNo',
-          title: '航空主运单编号'
+          title: '航空主运单编号',
+          width: 125
         },
         {
           dataIndex: 'subWaybillNo',
           key: 'subWaybillNo',
-          title: '运单编号'
+          title: '运单编号',
+          width: 90
         },
         {
           dataIndex: 'cargoName',
@@ -59,12 +62,14 @@ export default {
         {
           dataIndex: 'agent',
           key: 'agent',
-          title: '交货发货代理人'
+          title: '交货发货代理人',
+          width: 140
         },
         {
           dataIndex: 'agentLevel',
           key: 'agentLevel',
-          title: '代理人诚信等级'
+          title: '代理人诚信等级',
+          width: 125
         },
         {
           dataIndex: 'originAirport',
@@ -110,7 +115,8 @@ export default {
           dataIndex: 'operation',
           key: 'operation',
           title: '操作',
-          scopedSlots: { customRender: 'operation' }
+          scopedSlots: { customRender: 'operation' },
+          width: 120
         }
       ],
       tableData: [