Is there a way to only display a slot if it has any content?
For example, I\'m building a simple Card.vue component, and I only want the footer displayed if
Card.vue
It should be available at
this.$slots.footer
So, this should work.
hasFooterSlot() { return !!this.$slots.footer }
Example.