IO-2281 Added striped table colors

This commit is contained in:
swtmply
2023-06-01 02:34:18 +08:00
parent de62e994bd
commit d73b1d2220
2 changed files with 20 additions and 2 deletions

View File

@@ -156,3 +156,11 @@
td.ant-table-column-sort { td.ant-table-column-sort {
background-color: transparent; background-color: transparent;
} }
.ant-table-tbody > tr.ant-table-row:nth-child(2n) > td {
background-color: #f4f4f4;
}
.rowWithColor > td {
background-color: var(--bgColor) !important;
}

View File

@@ -246,11 +246,21 @@ export function ProductionListTable({
(x) => x.status === record.status (x) => x.status === record.status
); );
if (!color) return null; if (!color) {
if (index % 2 === 0)
return {
style: {
backgroundColor: `rgb(236, 236, 236)`,
},
};
return null;
}
return { return {
className: "rowWithColor",
style: { style: {
backgroundColor: `rgb(${color.color.r},${color.color.g},${color.color.b},${color.color.a})`, "--bgColor": `rgb(${color.color.r},${color.color.g},${color.color.b},${color.color.a})`,
}, },
}; };
}, },