原因:组件的样式为如下,导致该类名.table-striped未被正确赋予给组件
[data-doc-theme='light'] .ant-table-striped :deep(.table-striped) td { background-color: #fafafa; } [data-doc-theme='dark'] .ant-table-striped :deep(.table-striped) td { background-color: rgb(29, 29, 29); }
解决方法:删除前缀,修改后代码如下
修改为:
:[data-doc-theme='light'] .ant-table-striped :deep(.table-striped) td{background-color: #fafafa;}
[data-doc-theme='dark'] .ant-table-striped :deep .table-striped td{background-color:rgb(29, 29, 29);}