You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes you want to have a component to pass all its slot content to its only child, similar to what inheritAttrs does with attributes. As far as I've found, ways to do this in Vue 3 are quite unwieldy and hard to remember:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Sometimes you want to have a component to pass all its slot content to its only child, similar to what
inheritAttrs
does with attributes. As far as I've found, ways to do this in Vue 3 are quite unwieldy and hard to remember:https://gist.github.com/loilo/73c55ed04917ecf5d682ec70a2a1b8e2?permalink_comment_id=4389210#gistcomment-4389210
What's the reason for slots being inherited not being the default behavior, like with
inheritAttrs
? Is it possible to have an option to allow a component to opt in to inheriting slots? And is it possible to provide a way to easily pass slot contents to one of multiple child components, as a counterpart tov-bind="$attrs"
?Beta Was this translation helpful? Give feedback.
All reactions