-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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(compiler-core): avoid using component name as parameter name #11731
base: main
Are you sure you want to change the base?
Conversation
Size ReportBundles
Usages
|
commit: @vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
|
the cause is here core/packages/compiler-core/src/transforms/transformElement.ts Lines 345 to 351 in 741d8a0
|
this case, throwing an error might be more reasonable? |
if ( | ||
currentTag && | ||
identifiers && | ||
identifiers.some(i => i === currentTag) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is not correct. Consider the following scenario:
<div v-for="Comp of list">
<Comp>{{Comp}}</Comp>
</div>
I think so |
Consider this scenario |
Yeah, there are some other scenarios besides v-for that I didn't consider. |
close #11730
this pr -- playground v-for case
this pr -- playground v-slot case