小编E S*_*E S的帖子

当 primeNg p 表中未选择行时如何更改颜色?

我试图在取消选择行时将行的颜色更改为不同的颜色。这个功能是primeng主题提供的。我正在尝试覆盖它来自定义它。无论如何,我可以在取消选择行时更改行颜色,然后保留该颜色直到再次选择该行吗?我在这里使用单选 p 表。

我尝试用这个来覆盖:

data-table p-table .ui-table.ui-table-hoverable-rows .ui-table-tbody > tr.ui-selectable-row:not(.ui-state-highlight):not(.ui-contextmenu-selected):hover {
   background-color: #2F96B4 !important;
}
Run Code Online (Sandbox Code Playgroud)

但这只会改变鼠标悬停时的颜色。

这就是选择行时我所要做的:

data-table p-table .ui-table .ui-table-tbody > tr.ui-state-highlight {
   background-color: #007ad9;
   color: #ffffff;
}
Run Code Online (Sandbox Code Playgroud)

css sass primeng angular p-table

1
推荐指数
1
解决办法
5115
查看次数

标签 统计

angular ×1

css ×1

p-table ×1

primeng ×1

sass ×1