Skip to content

理解 Schema 与写入链路

编辑器里有两种状态:DocumentSchema 是要保存和传输的页面数据,selection、drag 和 panel 状态是设计态交互。只有前者进入历史和 Runtime。

text
业务交互
  -> 字段绑定、拖放或 designer.execute()
  -> Authoring engine 解析并校验 action
  -> 提交 DocumentSchema
  -> 更新 history
  -> Designer Presentation 重新投影画布

公开 execute() 使用 create-nodemove-nodeupdate-nodeupdate-pageupdate-global-configbatchundoredo 等 action。所有持久化写入都进入这条路径;保存或传输使用 designer.exportSchema(),不要修改 designer.document