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

fix(runtime-utils): support defineModel in mountSuspended #1011

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

wattanx
Copy link
Collaborator

@wattanx wattanx commented Nov 9, 2024

πŸ”— Linked issue

resolve: #572

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

When using defineModel, getCurrentInstance().emit is executed internally. Therefore, it needs to be overridden.
(This is a rather forceful approach, so I would like to consider better alternatives if available.)

https://github.com/vuejs/core/blob/main/packages/runtime-core/src/helpers/useModel.ts#L85

@wattanx wattanx marked this pull request as ready for review November 9, 2024 14:30
@wattanx wattanx requested a review from danielroe as a code owner November 9, 2024 14:30
@danielroe danielroe merged commit b491b38 into main Dec 3, 2024
4 checks passed
@danielroe danielroe deleted the fix/define-model branch December 3, 2024 15:45
This was referenced Dec 3, 2024
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.

Emitted events doesn't work with defineModel
2 participants