Parcourir la source

fix(departmentCostCalc): 修复行级CSS覆盖导致表格列特定字体颜色不生效的问题

code4eat il y a 2 semaines
Parent
commit
1031cca7ce

+ 2 - 14
src/pages/baseSetting/otherItemSet/departmentCostCalc/index.tsx

@@ -485,26 +485,14 @@ function generateColumns(
   ) {
     column.children = item.childTitle
       .map((a: any, aindex: number) =>
-        generateColumns(
-          a,
-          titleIndex + 1,
-          title,
-          hideRatioColumns,
-          currentFontColor,
-        ),
+        generateColumns(a, titleIndex + 1, title, hideRatioColumns, undefined),
       )
       .filter((col: any) => col !== null); // 过滤掉null项
   }
   if (item.child && Array.isArray(item.child) && item.child.length > 0) {
     column.children = item.child
       .map((a: any, aindex: number) =>
-        generateColumns(
-          a,
-          titleIndex + 1,
-          title,
-          hideRatioColumns,
-          currentFontColor,
-        ),
+        generateColumns(a, titleIndex + 1, title, hideRatioColumns, undefined),
       )
       .filter((col: any) => col !== null); // 过滤掉null项
   }

+ 2 - 10
src/pages/baseSetting/otherItemSet/departmentCostCalc/style.less

@@ -52,11 +52,7 @@
           > td.cost-ant-table-cell-fix-right,
           > td.cost-ant-table-cell-fix-left-last,
           > td.cost-ant-table-cell-fix-right-first {
-            color: var(--report-font-color, #17181a) !important;
-
-            * {
-              color: var(--report-font-color, #17181a) !important;
-            }
+            color: var(--report-font-color);
           }
         }
       }
@@ -192,11 +188,7 @@
                 > td.cost-ant-table-cell-fix-right,
                 > td.cost-ant-table-cell-fix-left-last,
                 > td.cost-ant-table-cell-fix-right-first {
-                  color: var(--report-font-color, #17181a) !important;
-
-                  * {
-                    color: var(--report-font-color, #17181a) !important;
-                  }
+                  color: var(--report-font-color);
                 }
               }
             }