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-core): modifier .trim compatibility (fix #6711) #6713

Conversation

zhangpaopao0609
Copy link

@zhangpaopao0609 zhangpaopao0609 commented Sep 21, 2022

issue

v-model.trim: incompatible trim() when emit arg is not string #6711

solution

image

If the emit's arg type is string, a.trim() is returned like before, if it is not, a is directly returned.

@zhangpaopao0609 zhangpaopao0609 changed the title fix: modifier trim compatibility (fix #6711) fix(runtime-core): modifier .trim compatibility (fix #6711) Sep 21, 2022
@sqal
Copy link
Contributor

sqal commented Sep 21, 2022

duplicate #5770

I don't think Vue should show a warning (even during development) if the value is not a string. It will probably just confuse people as to whether they can/cannot pass any type of value to the emit function.

@zhangpaopao0609
Copy link
Author

zhangpaopao0609 commented Sep 22, 2022

duplicate #5770

I don't think Vue should show a warning (even during development) if the value is not a string. It will probably just confuse people as to whether they can/cannot pass any type of value to the emit function.

That's right, this does cause such problems, thanks. I have removed that tip and leaving only the logic

@zhangzhonghe
Copy link
Member

duplicate #5770
I don't think Vue should show a warning (even during development) if the value is not a string. It will probably just confuse people as to whether they can/cannot pass any type of value to the emit function.

That's right, this does cause such problems, thanks. I have removed that tip and leaving only the logic

已经有人提过 PR 了,和你的修改一样。

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

3 participants