json - Microsoft 列表(共享点列表)- 多个 if 语句的条件格式问题
问题描述
在我的列表中,我有 Participant 列(1 到 6)和一个名为 Evenement 的列。
默认情况下,我希望参与者 1-5 列的背景颜色为绿色,参与者 6 列将为黄色,但如果晚上列的值为“方向”,我希望背景颜色黄色替换参与者 4 和参与者 5 列上的绿色.
我目前正在使用以下 JSON,但似乎无法使其正常工作。请注意,我对 JSON 完全陌生,并且在旅途中学习:
{
"elmType": "div",
"txtContent": "@currentField",
"attributes": {
},
"style": {
"background-color":
{
"operator": "?",
"operands": [
{
"operator": "==",
"operands": [
"@currentField",
""
]
},
"#98FB98",
{
"operator": "?",
"operands": [
{
"operator": "==",
"operands": [
"@currentField",
"Bloqué"
]
},
"#FF6A6A",
{
"operator": "?",
"operands": [
{
"operator": "==",
"operands": [
"[$Evenement]",
"Orientation"
]
},
"#FFFF66", ""
]
}
]
}
]
}
},
"customRowAction": {
},
"children": []
}```
解决方案
推荐阅读
- c++ - 为什么是_copy_constructible_v
>> 是真的,但不能复制? - c++ - std::vector::emplace_back(new T(args)) 和 std::vector::emplace_back(std::make_unique 有什么区别
(args)) 在汇编中? - node.js - 如何忽略 express 中的前缀 api 路由以进行任何操作?
- compiler-construction - 静态调度OOO处理器
- ruby - 如何最好地分解常见的类方法
- php - 将 MAMP Pro 4.2 托管的 PHP 5.6 应用程序连接到 MySQL 8,Windows 10 上的本地主机设置 (127.0.0.1)
- laravel - Laravel 中的范围搜索从空请求()返回所有结果
- html - 绝对位置不断将对象推到框架之外
- css - CSS 类未在 shopify 商店的 theme.scss 中定义
- python - 在python上方插入行的值