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

feat(editor): add extract module feature #675

Merged
merged 1 commit into from
Jan 19, 2023
Merged

Conversation

tanbowensg
Copy link
Collaborator

@tanbowensg tanbowensg commented Jan 13, 2023

Feature

This feature can help user to extract sunmao components into module to refactor old code.
To do so, user need to choose a component as the root of module. This component and its children will be moved into new module. Sunmao will auto analyse the relationship of dependency between in-module components and out-module components. According to the relationship, sunmao will auto generate new module config and modify the properties of related components. Sunmao did most job of extracting module, user only need click to use.

related issue: #581

default.mov


options.scopeObject = {
...options.scopeObject,
$slot: redirector,
$slot: options.slotKey ? store[options.slotKey] : undefined,
Copy link
Collaborator Author

@tanbowensg tanbowensg Jan 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original way pass a Proxy to $slot. But $slot doesn't work in module if using Proxy. So I pass store[options.slotKey] as $slot to fix this bug.

@tanbowensg tanbowensg merged commit 047b8e4 into develop Jan 19, 2023
@tanbowensg tanbowensg deleted the feat/extract-module branch January 19, 2023 05:57
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

Successfully merging this pull request may close these issues.

2 participants