-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: schemaDataAsync #885
base: refactor/develop
Are you sure you want to change the base?
feat: schemaDataAsync #885
Conversation
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
ba58c1b
to
5ab6050
Compare
82c922f
to
1f023f4
Compare
English | 简体中文
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Background and solution
【背景&问题】What is the current behavior?
【解决方案】What is the new behavior?
统一 schema 修改入口 + schema 变更事件发布订阅 + jsondiff 同步差异
【PR主要改动点】
修改 schema 统一入口。
以往修改 schema 的方法:直接
schema.props = xxx
,即拿到引用直接进行修改当前 schema 修改的入口改为:
useCanvas().opeateNode(operation)
主要用于操作节点删除、节点新增、节点 props 属性修改。useCanvas().updateSchema(data)
主要用于更新 schema 的state
、css
、method
、lifecycles
等非节点属性。useCanvas().importSchema(data)
主要用于页面、区块之间的切换。事件通知 schema 改变事件。
schemaChange
事件。调用opeateNode
以及updateSchema
会触发该事件的发布。schemaImport
事件。调用importSchema
会触发该事件的发布。修改
utils
、bridge
、globalState
、dataSourceMap
等入口从直接修改画布改为直接修改useResource
中的appSchemaState
画布
RenderMain
减少相关 schema 的操作接口(修改移动到统一的页面修改入口以及 appSchema 修改)setUtils
、updateUtils
、deleteUtils
、getBridge
、setBridge
、getMethods
、setMethods
、getSchema
、setSchema
、getState
、deleteState
、setState
、getProps
、setProps
、getContext
、getRoot
、getNode
、setNode
、getCondition
、getGlobalState
、setGlobalState
、getDataSourceMap
、setDataSourceMap
画布对 schema 变更的状态的感知,改为 schema 相关修改事件的监听以及状态的订阅。
语义化重命名:
resState
改为appSchemaState
Does this PR introduce a breaking change?
Other information