Skip to content

Commit bc0b940

Browse files
liujupingJackLian
authored andcommitted
docs: update faq009.md
完善“物料出现 Component Not Found 相关报错” FAQ
1 parent f7c1f1e commit bc0b940

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

docs/docs/faq/faq009.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,28 @@ AliLowCodeEngine.project.simulator.renderer.components
2828
```
2929
看看对应的物料是否存在,如果不存在,排查物料问题。
3030

31+
如果不正常,查看资产包配置,其中资产包中的 `components``material.componentsMap` 生成有关系。
32+
33+
例如,物料配置信息在 @alilc/lowcode-materials 包里面,即需要在 components 中加上下面的代码
34+
35+
```javascript
36+
"components": [{
37+
"exportName": "AlilcLowcodeMaterialsMeta",
38+
"npm": {
39+
"package": "@alilc/lowcode-materials"
40+
},
41+
"url": "https://alifd.alicdn.com/npm/@alilc/[email protected]/build/lowcode/meta.js",
42+
"urls": {
43+
"default": "https://alifd.alicdn.com/npm/@alilc/[email protected]/build/lowcode/meta.js",
44+
"design": "https://alifd.alicdn.com/npm/@alilc/[email protected]/build/lowcode/meta.design.js"
45+
}
46+
}]
47+
```
48+
49+
`material.componentsMap` 不存在相关的组件信息,原因有两个:
50+
- 没有添加对应的物料到 components 字段中
51+
- components 配置不正确,需要查看 url 是否正常加载,查看 exportName 是否配置正确,即 `window.${exportName}` 是否存在。
52+
3153
2.选中组件,在控制台中输入
3254
```json
3355
AliLowCodeEngine.project.currentDocument.selection.getNodes()[0].exportSchema('render')

0 commit comments

Comments
 (0)