我有一个SharePoint列表,我需要让"Ops Response“列中的每个单元格在操作员响应时突出显示为绿色,在输入条目但尚未有人响应时突出显示为红色。我附上了列表的屏幕截图
发布于 2020-02-13 17:35:35
单击下拉箭头并选择“设置此列的格式”

在右边显示的框中,粘贴下面引用的JSON。单击保存。

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"debugMode": true,
"elmType": "div",
"attributes": {
"class": "=if(@currentField != '', 'sp-field-severity--good', if(@currentField == '', 'sp-field-severity--severeWarning', ''))"
},
"children": [
{
"elmType": "span",
"style": {
"display": "inline-block",
"padding": "0 4px"
}
},
{
"elmType": "span",
"txtContent": "@currentField"
}
]
}最终

https://stackoverflow.com/questions/60184717
复制相似问题