Skip to content
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

history.back/forward无法还原modal-node的hidden属性,导致模态框(对话框)中编辑后redo/undo失效问题 #3080

Open
zr443 opened this issue Jul 31, 2024 · 0 comments

Comments

@zr443
Copy link

zr443 commented Jul 31, 2024

在Modal模态框节点中编辑子组件后,redo/undo无法正常撤销和还原

查看源码发现在DocumentModel中,通过importSchema的方式来实现redo/undo,会重建ModalNodesManager。
导致Modal节点的hidden属性被重置(即使schema中的hidden是false)。

所以在编辑Modal节点中编辑子组件后,redo/undo会导致Modal隐藏。
用户想要查看redo/undo是否生效,会再次点开Modal。此时会打乱history的records,无法使用redo/undo。

请问这个问题,有没有好的规避方法?


复现步骤

1、打开Antd组件官方Demo:https://lowcode-engine.cn/demo/demo-basic-antd/index.html

2、拖入“反馈>普通型”Modal组件。

3、在Modal内,拖入“主按钮”组件。

4、键盘操作“undo”,或者点击头部“撤销”按钮。Modal隐藏。

5、大纲树中点击Modal,打开检查,“主按钮”组件被删除。

6、键盘操作“redo”,或者点击头部“恢复”按钮。Modal依旧隐藏,“主按钮”组件不会恢复。


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant