-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
use slotted() in component is not working when use transition element #2892
Comments
const setScopeId = (
el: RendererElement,
scopeId: string | false | null,
vnode: VNode,
parentComponent: ComponentInternalInstance | null
) => {
if (scopeId) {
hostSetScopeId(el, scopeId)
}
if (parentComponent) {
const treeOwnerId = parentComponent.type.__scopeId
// vnode's own scopeId and the current patched component's scopeId is
// different - this is a slot content node.
if (treeOwnerId && treeOwnerId !== scopeId) {
hostSetScopeId(el, treeOwnerId + '-s')
}
//.....
}
} caused by: if slot's |
@edison1105 Your fix does not solve the real cause. And there are problems according to your changes, let's say if the |
Nice to know this and I will close my PR. |
Update: the root cause of this is flawed implementation of <Comp>
<slot/>
</Comp>
<style scoped>
:slotted(*) { color: red }
</style> #3150 only special cases internal components like Transition, but the ideal behavior is for I'm working on a fix for this but it requires a pretty substantial refactor and may take a while. |
Version
3.0.4
Reproduction link
https://github.com/pgy108103/vue3_vite_issue_sample
Steps to reproduce
Change hasTransition flage in todo.vue, you will see that.
What is expected?
I want transition elements to be used with components that use slotted()
What is actually happening?
As title.
The text was updated successfully, but these errors were encountered: