Add an official way to check if a slot is empty #687
dorian-marchal
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Basically, this is exact same request than vuejs/core#4733 (now closed) but with an additional argument:
All the proposed ways to check if a slot is empty I found don't work with this use case: Vue SFC Playground
In this repro, the component should render
hasContent [x]
because the slot is not empty, but in this case the vNode received byisVNodeEmpty
looks like that (a comment node):Oddly, this works as expected if I give a default value to
tag
, e.g.{ tag = 'div' } = {}
Previous discussions:
Beta Was this translation helpful? Give feedback.
All reactions