-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
material.componentsMap变更问题 #1857
Comments
你好 @luoxq1212,由于缺乏必要的信息(如 bug 重现步骤、引擎版本信息 等),无法定位问题,请按照 issue bug 模板 补全信息,也可以通过阅读 引擎的 issue 说明 了解什么类型的 issue 可以获得更好、更快的支持。 |
给个复现demo,或者通过官方demo提供复现步骤 |
@JackLian 这个是一个自定义的切换物料插件Demo,material.setAssets 切换更新组件库后material.componentsMap仍然是旧的assets组件。我这里期望是material.componentsMap会更新到最新的Assets组件。 ` const switchingAssets = () => { material.setAssets({
});
}; |
@JackLian 请问如果想要实现这个效果,目前有其他实现方案吗? |
确实也没见过有需要切换物料的场景,如果物料都换了,那单独做成俩设计器不是更简单.... |
@luoxq1212 可以使用最新 beta 版本的 material.refreshComponentMetasMap API |
@liujuping material.refreshComponentMetasMap API 确实是可以刷新,但AliLowCodeEngine.project.simulator.renderer.components 也还是旧的。 |
@luoxq1212 请问有后续解决方案吗?我也需要实现类似的效果,要是无法支持的话,只能通过重刷页面,设计器重新初始化的这种方式了。 |
Describe the bug (required) / 详细描述 bug(必填)
使用material.setAssets(assets)修改后,其material.componentsMap未发生变更
To Reproduce (required) / 如何复现 bug?(必填,非常重要)
在自定义的一个插件里,通过pluginContext.material.setAssets(assets) 变更了组件库的组件列表,但其material.componentsMap仍然是旧的assets组件
Expected behavior (required) / 预期行为(必填,非常重要)
A clear and concise description of what did you expect to happen. / 请清晰和精确的描述你预期的行为
希望通过pluginContext.material.setAssets(assets)变更能实现组件库物料的变更
Environments (please complete the following information) (required): / 请提供如下信息(必填)
The text was updated successfully, but these errors were encountered: