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: add default detection for complex types #1649

Merged
merged 9 commits into from Jul 31, 2022

Conversation

elevatebart
Copy link
Contributor

In case the type of a prop is an array or an object, the default has to be passed as a function.

The function is there to avoid referencing the same default object on every instance of the component. It does not bring any semantic information to the user of a component.

Additionally, this PR is meant to add support for default values for props defined using the options API.

@johnsoncodehk johnsoncodehk merged commit 690d617 into vuejs:master Jul 31, 2022
@elevatebart elevatebart deleted the elevatebart/default-advanced branch July 31, 2022 16:12
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.

None yet

2 participants