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): v-model modifiers trim and number when cases don't match #9609

Merged
merged 5 commits into from
Jul 13, 2024

Conversation

skirtles-code
Copy link
Contributor

@skirtles-code skirtles-code commented Nov 15, 2023

Closes #4848.

There is an existing PR for this, #4850. This PR includes the commits from that PR, but I thought there was another edge case that needed addressing, otherwise it would cause a regression.

The original PR assumed that the prop would always be written in either kebab-case or camelCase. While this is usually true, it doesn't take account of the possibility that the prop name could be written in neither case convention. In that scenario, an exact match should still work, which is what I've tried to handle here.

I've also switched the new tests from jest to vi and added some extra tests.

Copy link

github-actions bot commented Nov 15, 2023

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 89.6 kB (+74 B) 34.2 kB (+18 B) 30.9 kB (+52 B)
vue.global.prod.js 146 kB (+74 B) 53.7 kB (+18 B) 47.9 kB (+87 B)

Usages

Name Size Gzip Brotli
createApp 51.5 kB (+74 B) 20.1 kB (+18 B) 18.3 kB (+14 B)
createSSRApp 54.8 kB (+74 B) 21.5 kB (+15 B) 19.5 kB (+18 B)
defineCustomElement 53.8 kB (+74 B) 20.9 kB (+18 B) 19 kB (+15 B)
overall 65.2 kB (+74 B) 25.2 kB (+17 B) 22.8 kB (+59 B)

Copy link
Member

@baiwusanyu-c baiwusanyu-c left a comment

Choose a reason for hiding this comment

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

LGTM

@yyx990803 yyx990803 merged commit 7fb6eb8 into vuejs:main Jul 13, 2024
11 checks passed
jacobfogolyan pushed a commit to jacobfogolyan/vuejs-core that referenced this pull request Jul 13, 2024
…don't match (vuejs#9609)

close vuejs#4848
close vuejs#4850 (based on commits from vuejs#4850)

Co-authored-by: zhaozhongyu <zhaozhongyu@xunlei.com>
Co-authored-by: Evan You <evan@vuejs.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

v-model Modifiers trim/number did not work if use hyphenate string in props and camelize in emits, or reverse
4 participants