我已经尝试解决这个问题,但无法在单击事件上突出显示行。
<ng2-smart-table [settings]="settingsPatient" [source]="sourcePatient" (userRowSelect)="patientStudy($event)" (deleteConfirm)="onDeleteConfirm($event)">"
</ng2-smart-table>
我使用的是angular 7,当我点击ng2-smart-table行中的任何一行时,都不会被高亮显示,例如,当我点击它时,改变行的颜色。
这是我对行点击事件的函数-(UserRowSelect)=“patientStudy($event)”。
发布于 2019-03-15 12:24:01
当一行被选中时,' selected‘类将被添加到该行...在这里,我们可以使用以下命令设置行的样式:
::ng-deep tbody tr.ng2-smart-row.selected
{ background:lightblue !important; border:1px solid blue;}发布于 2021-04-30 22:54:52
这对我来说很有效:
::ng-deep .nb-theme-default ng2-smart-table tbody tr.selected, .nb-theme-default ng2-smart-table tbody tr:hover { background: rgb(34, 151, 190) !important; border:1px solid blue; }
https://stackoverflow.com/questions/55175147
复制相似问题