File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ title : Slot组件渲染报错问题
3+ sidebar_position : 23
4+ tags : [FAQ]
5+ ---
6+
7+ ## 问题描述
8+ 在低代码引擎的页面渲染过程中,可能会遇到一个关于Slot组件的报错,提示“Slot找不到”。实际上,在渲染态时不应使用Slot组件。
9+
10+ ## 问题原因
11+ 低代码引擎渲染分为两个状态:设计态和渲染态。
12+ - ** 设计态** :为了帮助插槽进行可视化设计,引入了Slot组件。
13+ - ** 渲染态** :在此状态下,不需要使用Slot组件。
14+
15+ 这个问题通常是因为在渲染态错误地使用了设计态的schema。
16+
17+ ## 解决方案
18+ 1 . ** 区分设计态和渲染态** :通过` project.exportSchema(TransformStage.Save) ` 的参数来区分。
19+ - ` TransformStage.Save ` 代表渲染态的schema,其中不包含Slot组件。
20+ - 【默认值】` TransformStage.Render ` 代表设计态的schema,其中包含Slot组件。
21+ 2 . ** 使用正确的API和参数** :确保在渲染态使用正确的schema,避免引用设计态的Slot组件。
22+ 3 . ** 处理脏数据问题** :如果问题是由脏数据导致,清除数据并重新拖拽组件以恢复正常。
23+
24+ ## 注意事项
25+ - 确保在代码和配置中正确区分设计态和渲染态。
26+ - 如果遇到持续的问题,检查是否有脏数据或配置错误,并进行相应的清理和调整。
27+
28+ ## 相关链接
29+ - Issue链接:[ Issue #1798 ] ( https://github.com/alibaba/lowcode-engine/issues/1798 )
30+
31+ ---
You can’t perform that action at this time.
0 commit comments