reaper vor 4 Jahren
Ursprung
Commit
55fe4fb0dc
1 geänderte Dateien mit 18 neuen und 14 gelöschten Zeilen
  1. 18 14
      src/components/knowledgeExtra/AddNewRuleTable.vue

+ 18 - 14
src/components/knowledgeExtra/AddNewRuleTable.vue

@@ -75,9 +75,9 @@
       margin-right: 4px;
     }
   }
-  ::v-deep .el-table tbody tr:hover > td {
-    background-color: transparent;
-  }
+  // ::v-deep .el-table tbody tr:hover > td {
+  //   // background-color: transparent;
+  // }
   /deep/ .el-table th {
     background: transparent;
   }
@@ -87,9 +87,9 @@
   .table_cell_cls {
     vertical-align: top;
   }
-  /deep/ .el-table__body .el-table__row.hover-row td {
-    background-color: transparent;
-  }
+  // /deep/ .el-table__body .el-table__row.hover-row td {
+  //   // background-color: transparent;
+  // }
   /deep/ .el-form-item__label {
     font-size: 12px;
   }
@@ -97,6 +97,9 @@
     font-size: 14px;
     font-weight: 400;
   }
+  // /deep/ .el-table__body tr.current-row>td{
+  //   background: #fff;
+  // }
 }
 </style>
 
@@ -104,17 +107,18 @@
   <!-- :prop="`klRuleByIdSub[${scope.$index}].subDescription`" -->
   <div class="AddNewRuleTable">
     <h4 style="margin-bottom: 24px">规则内容:</h4>
+    <!-- 隔行换色  :row-style="rowStyle" -->
     <el-table
       border
       :data="klRuleByIdSub"
       size="mini"
       style="min-height: 200px"
       height="calc(100vh - 383px)"
-      :row-style="rowStyle"
       :header-row-style="{ background: '#E3EAF4' }"
       :cell-style="cellStyle"
       :span-method="ObjectSpanMethod"
       ref="table"
+      row-key="groupChildId"
     >
       <el-table-column width="80px" label="组" prop="groupType" fixed="left">
         <template slot-scope="scope">
@@ -519,13 +523,13 @@ export default {
       this.$refs.table.bodyWrapper.scrollLeft = 0;
     },
     // table 隔行换色
-    rowStyle({ row }) {
-      if (row.rowIndex % 2 == 0) {
-        return {
-          background: "#DFF7EF"
-        };
-      }
-    },
+    // rowStyle({ row }) {
+    //   if (row.rowIndex % 2 == 0) {
+    //     return {
+    //       background: "#DFF7EF"
+    //     };
+    //   }
+    // },
     // cellStyle
     cellStyle({ row, column, rowIndex, columnIndex }) {
       if (column.label == "组" || column.label == "基础规则") return {};