-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
$scopedSlots is empty until render() #11714
Comments
shadowings-zy
added a commit
to shadowings-zy/vue
that referenced
this issue
Oct 17, 2020
shadowings-zy
added a commit
to shadowings-zy/vue
that referenced
this issue
Oct 17, 2020
shadowings-zy
added a commit
to shadowings-zy/vue
that referenced
this issue
Oct 17, 2020
shadowings-zy
added a commit
to shadowings-zy/vue
that referenced
this issue
Oct 17, 2020
Hello, I fix this bug in PR #11726 . |
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
2.6.11
Reproduction link
https://codepen.io/kaelwd/pen/rNLNYGL?editors=1011
Steps to reproduce
Open the console
What is expected?
"ScopedComponent beforeMount" true
to be loggedWhat is actually happening?
"ScopedComponent beforeMount" false
This was discovered in vuetify: vuetifyjs/vuetify#11533 (comment)
The real setup is a watcher on a computed property that depends on
$slots
. The watcher is called before mount to get an initial value, causing the computed property to be executed and return an incorrect value.Minimal example with the watcher if that helps: https://codepen.io/kaelwd/pen/vYKYWbV?editors=1010
This works as expected in vue 3: https://codepen.io/kaelwd/pen/gOMOXoB?editors=1011
The bug seems to have existed since scoped slots were introduced in v2.1, but it wasn't a problem here until v2.6 when scoped slots started being used everywhere with
v-slot
The text was updated successfully, but these errors were encountered: