You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Microsoft Lists更新后?env=WebViewList视图JSON列格式化链接失效

Microsoft Lists WebViewList视图下自定义JSON列格式化超链接点击无响应

问题概述

此前我们通过JSON列格式化在「单行文本」类型列中实现超链接功能。在Microsoft Lists完成近期更新后,自定义JSON生成的超链接仅在列表URL带有?env=WebViewList后缀的现代视图中出现点击无响应的问题,官方示例代码则不受影响。移除该URL后缀后链接功能恢复正常,且租户内所有站点列表均存在此问题。

复现步骤

  1. 创建Microsoft List;
  2. 进入列表并确认URL带有?env=WebViewList后缀(个人及SharePoint站点内列表均可复现);
  3. 创建「单行文本」类型列;
  4. 点击列标题,选择「列设置」>「格式化此列」>「高级模式」;
  5. 粘贴以下JSON代码并保存:
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "a",
  "attributes": {
    "href": "https://www.google.com",
    "target": "_blank"
  },
  "style": {
    "text-decoration": "none"
  },
  "children": [
    {
      "elmType": "button",
      "attributes": {
        "class": "ms-fontColor-themePrimary ms-fontColor-themeDark--hover",
        "title": "Click Me"
      },
      "style": {
        "border": "none",
        "background-color": "transparent",
        "cursor": "pointer"
      },
      "children": [
        {
          "elmType": "span",
          "attributes": {
            "iconName": "Attach",
            "class": "ms-font"
          },
          "style": {
            "padding-right": "2px"
          }
        },
        {
          "elmType": "span",
          "txtContent": "Click Me"
        }
      ]
    }
  ]
}
  1. 添加列表项查看生成的链接;
  2. 点击生成的链接无反应;
  3. 若为SharePoint站点内列表,移除URL中的?env=WebViewList后缀并刷新,链接恢复正常。

补充测试发现

进一步测试显示,点击链接文本右侧的空白区域时链接可正常触发,但点击文本本身无响应。


内容的提问来源于stack exchange,提问作者user1063287

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.07 05:47:21