我想更改网格的列颜色。不幸的是没有任何反应......这是我的代码:
grid.setCellStyleGenerator(( Grid.CellReference cellReference ) -> {
if ( "name".equals( cellReference.getPropertyId() ) ) {
return "highlight-green";
} else {
return "rightAligned";
}
});
mytheme.scss:
@import "../valo/valo.scss";
@mixin mytheme {
@include valo;
// Insert your own theme rules here
.rightAligned {
text-align: right;
}
.v-table-row.v-table-row-highlight-green,
.v-table-row-odd.v-table-row-highlight-green {
background-color: #00ff00;
}
}
rightAligned
效果很好,但highlight-green
没有
答案 0 :(得分:0)
尝试添加background-color: #00ff00 !important;
看起来您需要重写框架的现有样式,!important
必须对此有所帮助。