其他分享
首页 > 其他分享> > 列高亮显示

列高亮显示

作者:互联网

{
    "$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json",
    "debugMode": true,
    "elmType": "div",
    "children": [
        {
            "elmType": "span",
            "style": {
                "width": "14px",
                "height": "14px",
                "border-radius": "14px",
                "background-color": {
                    "operator": "?",
                    "operands": [
                        {
                            "operator": "==",
                            "operands": [
                                {
                                    "operator": "toString()",
                                    "operands": [
                                        "@currentField"
                                    ]
                                },
                                "Green"
                            ]
                        },
                        "#2dc937",
                        {
                            "operator": "?",
                            "operands":[
                                {
                                    "operator": "==",
                                    "operands": [
                                        {
                                            "operator": "toString()",
                                            "operands": [
                                                "@currentField"
                                            ]
                                        },
                                        "Yellow"
                                    ]
                                },
                                "#e7b416",
                                {
                                    "operator": "?",
                                    "operands":[
                                        {
                                            "operator": "==",
                                            "operands": [
                                                {
                                                    "operator": "toString()",
                                                    "operands": [
                                                        "@currentField"
                                                    ]
                                                },
                                                "Red"
                                            ]
                                        },
                                        "#cc3232",
                                        ""
                                    ]
                                }
                            ]
                        }
                    ]
                }
            }
        }
    ]
}

  需要设置SharePoint 列为dropdown 类型,eg.: Red,Yellow,Green

 

标签:currentField,显示,operands,14px,toString,operator,列高亮,Red
来源: https://www.cnblogs.com/Nigel/p/11011198.html