UNPKG

naive-ui

Version:

A Vue 3 Component Library. Fairly Complete, Theme Customizable, Uses TypeScript, Fast

6 lines 199 B
export function getSlot(instance, slotName = 'default', fallback = []) { const slots = instance.$slots; const slot = slots[slotName]; if (slot === undefined) return fallback; return slot(); }