Skip to content

Commit

Permalink
docs: update faq009.md
Browse files Browse the repository at this point in the history
完善“物料出现 Component Not Found 相关报错” FAQ
  • Loading branch information
liujuping authored and JackLian committed Aug 16, 2023
1 parent f7c1f1e commit bc0b940
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/docs/faq/faq009.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,28 @@ AliLowCodeEngine.project.simulator.renderer.components
```
看看对应的物料是否存在,如果不存在,排查物料问题。

如果不正常,查看资产包配置,其中资产包中的 `components``material.componentsMap` 生成有关系。

例如,物料配置信息在 @alilc/lowcode-materials 包里面,即需要在 components 中加上下面的代码

```javascript
"components": [{
"exportName": "AlilcLowcodeMaterialsMeta",
"npm": {
"package": "@alilc/lowcode-materials"
},
"url": "https://alifd.alicdn.com/npm/@alilc/[email protected]/build/lowcode/meta.js",
"urls": {
"default": "https://alifd.alicdn.com/npm/@alilc/[email protected]/build/lowcode/meta.js",
"design": "https://alifd.alicdn.com/npm/@alilc/[email protected]/build/lowcode/meta.design.js"
}
}]
```

`material.componentsMap` 不存在相关的组件信息,原因有两个:
- 没有添加对应的物料到 components 字段中
- components 配置不正确,需要查看 url 是否正常加载,查看 exportName 是否配置正确,即 `window.${exportName}` 是否存在。

2.选中组件,在控制台中输入
```json
AliLowCodeEngine.project.currentDocument.selection.getNodes()[0].exportSchema('render')
Expand Down

0 comments on commit bc0b940

Please sign in to comment.