【发布时间】:2021-01-27 08:59:18
【问题描述】:
我想验证单元格,当数字不同于 9 时我想更改背景
我有这张桌子:
{
cellEditor: 'numberRenderer',
width: 150,
cellClass: this.compareValues,
newValueHandler: this.compareValues,
cellEditorParams: {
required: true,
},
compareValues(params) {
return params.value === 9?'':'myClass';
},
.myClass
background: var(--ag-header-background-color, #222628)
但是当我输入数字 9 时,我没有看到风格的变化,这是什么问题?
【问题讨论】:
-
有两种可能,一是您的条件值不匹配,二是您的样式格式不正确