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

添加更新编辑器配置api #571

Closed
284668461 opened this issue May 15, 2024 · 3 comments
Closed

添加更新编辑器配置api #571

284668461 opened this issue May 15, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@284668461
Copy link

284668461 commented May 15, 2024

What problem does this feature solve?

作者你好,我想要在编辑器初始化完毕后,由用户来自定义页码是否展示和其他的size、rowFlex等相关设置,找遍了文档、示例和issue,都没发现可用的的comman命令。请问有没有此命令?没有的话可否在后面加上。
另外就是,别的配置(IHeader 等)好像也无法在编辑器初始化后再进行更改?

What does the proposed API look like?

也许可以来个类似以下命令的api 来更新所有的配置?
instance.command.executeSet({ IPageNumber:{ rowFlex:"RIGHT", fromPageNo:1 } })

@Hufe921
Copy link
Owner

Hufe921 commented May 15, 2024

先销毁再重新实例化编辑器呢

@284668461
Copy link
Author

@Hufe921 感谢回复。销毁再重新实例化编辑器可以实现目的。文档中说 executeForceUpdate 可以强制重新渲染文档,又可以传递参数进去,但试了下使用强制渲染无法更新配置,想了解下这个executeForceUpdate 命令是在什么情况下使用?又应该传递哪些参数进去?

@Hufe921
Copy link
Owner

Hufe921 commented May 15, 2024

说明:executeForceUpdate用于强制重新渲染编辑器内容。正常情况下用不到此api,某些场景下如:通过getOptions方法获取配置后进行修改,后执行executeForceUpdate就可以看到更新配置的效果。

限制:仅对渲染时的配置(如:defaultColor、defaultSize......)有效,实例化就已经用到的配置(如:width、height)无效。

@Hufe921 Hufe921 changed the title 缺少更新配置comman 添加更新编辑器配置api May 15, 2024
@Hufe921 Hufe921 added the enhancement New feature or request label May 15, 2024
Hufe921 added a commit that referenced this issue May 17, 2024
@Hufe921 Hufe921 closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants