Closed tanbowensg closed 1 year ago
Add module config in module's spec, like this:
{ "kind": "Module", "parsedVersion": { "category": "custom/v1", "value": "myModule" }, "version": "custom/v1", "metadata": { "name": "myModule0", "description": "my module", "exampleProperties": {} }, "spec": { "stateMap": {}, "events": [], "properties": { "type": "object", "properties": {} }, "methods": [ { "name": "open", "componentId": "modal1", "componentMethod": "openModal" } ] },
It works like a proxy. When other components calls open method on ModuleContainer, ModuleRenderer will call modal1's openModal method.
open
ModuleContainer
ModuleRenderer
modal1
openModal
https://user-images.githubusercontent.com/12260952/228761936-f665af4c-7cb6-40e6-8264-d40670d4e110.mov
how to use?
Add module config in module's spec, like this:
It works like a proxy. When other components calls
open
method onModuleContainer
,ModuleRenderer
will callmodal1
'sopenModal
method.https://user-images.githubusercontent.com/12260952/228761936-f665af4c-7cb6-40e6-8264-d40670d4e110.mov