SPFx:在清单JSON中加载架构的问题

问题描述 投票:0回答:1

我在用于SP的新Web部件中的SPFx中加载$ schema时遇到问题。 Web部件正在Benchmark.aspx上运行,但是我的整个清单未得到处理,因此我无法设置preconfiguredEntries,这对我来说是个大问题。

错误是:加载参考'https://developer.microsoft.com/json-schemas/spfx/client-side-manifest-base.schema.json'时出现问题:请求vscode /内容意外失败,但未提供任何详细信息。(768)

对这个问题有任何想法吗?

{
  
  "$schema": "https://developer.microsoft.com/json-schemas/spfx/client-side-web-part-manifest.schema.json", 
    
  "id": "56dab116-67ba-453f-883d-b7a11690e965",
  "alias": "ReadListWebPart",
  "supportedHosts": ["SharePointWebPart"],
  "componentType": "Webpart", 
  
  "version": "1.0",
  "manifestVersion": "2",

  
  "requiresCustomScript": false,
  

  "preconfiguredEntries": [{
    "groupId": "5c03119e-3074-46fd-976b-c60198311f70", 
    "group": { "default": "Other" },
    "title": { "default": "read-list" },
    "description": { "default": "popis web party" },
    "officeFabricIconFontName": "Page",
    "properties": {
      "vedouci_velke_foto": true,
      "asistenti_pod_vedoucim": false, 
      "nazev_web_party": "To jsme my"   
    }
  }]
}
sharepoint jsonschema web-parts spfx manifest.json
1个回答
0
投票

我检查了manifest.json,将与您的相同,并发出以下警告:

enter image description here

然后测试了可以在本地访问“ https://developer.microsoft.com/json-schemas/spfx/client-side-web-part-manifest.schema.json”,没问题,仍然可以访问。

此后,我测试以如下方式在React SPFX Web部件中输出预配置的属性:

enter image description here

enter image description here

enter image description here

enter image description here

仍然可以输出属性:

enter image description here

最后,您可以忽略这个问题,它仍然可以读取preconfiguredEntries。

© www.soinside.com 2019 - 2024. All rights reserved.