现代SharePoint Online列表中列宽的JSON无效

现代SharePoint Online列表中列宽的JSON无效,json,sharepoint-online,sharepoint-list,Json,Sharepoint Online,Sharepoint List,我知道脚本在文本颜色变化时工作,没有错误;但是,无论我输入的宽度是多少,它都不会改变。例如,如果我输入300、600或1000,它在查看时保持不变 如上所述,我已将列宽更改为不同的值,并已从文本更改为富文本、增强等 { “$schema”:”https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", “elmType”:“div”, “txtContent”:“@currentField”, “风

我知道脚本在文本颜色变化时工作,没有错误;但是,无论我输入的宽度是多少,它都不会改变。例如,如果我输入300、600或1000,它在查看时保持不变

如上所述,我已将列宽更改为不同的值,并已从文本更改为富文本、增强等

{
“$schema”:”https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
“elmType”:“div”,
“txtContent”:“@currentField”,
“风格”:{
“颜色”:“绿色”,
“宽度”:“300px”
}
}

我希望列宽是脚本中指定的设置大小,例如600、300、1000。

尝试使用样式名称
列宽
并从宽度值中删除
px
。我需要更改列宽,在阅读了JSON之后,我仍然需要一个示例,并找到了您的问题。我更改了样式名称和宽度值,结果成功

{
“$schema”:”https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", 
“elmType”:“div”,
“txtContent”:“@currentField”,
“风格”:{
“颜色”:“绿色”,
“列宽”:“300”
}
}

尝试使用样式名称
列宽
并从宽度值中删除
px
。我需要更改列宽,在阅读了JSON之后,我仍然需要一个示例,并找到了您的问题。我更改了样式名称和宽度值,结果成功

{
“$schema”:”https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", 
“elmType”:“div”,
“txtContent”:“@currentField”,
“风格”:{
“颜色”:“绿色”,
“列宽”:“300”
}
}

你找到答案了吗?你找到答案了吗?