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
You should check vm.$slots and also vm.$scopedSlots for it.
vm.$slots
vm.$scopedSlots
hasSlot (name = 'default') { return !!this.$slots[ name ] || !!this.$scopedSlots[ name ]; }