UNPKG

@lui-ui/lui-vue

Version:

This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.

14 lines (13 loc) 400 B
import { Comment } from "vue"; function asArray(arg) { return Array.isArray(arg) ? arg : arg != null ? [arg] : []; } function isVNodeEmpty(vnode) { return !vnode || asArray(vnode).every((vnode2) => vnode2.type === Comment); } function isSlotEmpty(slot, props = {}) { return isVNodeEmpty(slot?.(props)); } export function hasSlotContent(slot, props = {}) { return !isSlotEmpty(slot, props); }