-
Notifications
You must be signed in to change notification settings - Fork 741
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
开发一个新组件,在新组件内部需要修改formConfig的某个属性,这个是使用什么方法可以完成 #578
Comments
具体描述一下场景,要实现什么功能,在什么时机需要改? |
是跟这个issue 一样的需求?#567 |
我想开发一个文本编辑器组件,该组件可以双击就可以编辑,该组件获取到的文本字符串怎么传递到该组件的form表单中 |
调用editorService.update把数据更新就可以了,更新的数据要包含id editorService.update({ id: xxx, text: xxx }) |
请问组件内部如何获取到editorService呢?看了下示例,有注入app,但是没有各类service的注入 |
如果是ui组件的话, 内部是无法调用service, service是编辑器专属的, runtime无法使用, 否则最终的h5页面会有很多的冗余代码 |
明白了,那我组件内如何修改对应props.config对象的某个值呢?比如props.config.foo,右侧表单输入的是‘bar’,组件内部想修改成'ugly',找了很久的文档都没找到,看代码也没有看到。这个需求有办法解决吗? |
组件内是不允许修改config的 |
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: