UNPKG

ideaz-element

Version:

<p align="center"> <a href="" target="_blank" rel="noopener noreferrer"> <img src="./docs/public/logo.svg" alt="Ideaz Element" width="180" style="width: 180px;" /> </a> </p>

22 lines (21 loc) 978 B
import "../../../../utils/index.mjs"; import { watch as c } from "vue"; import { isObject as l, isString as t, isSlot as u, isFunction as f } from "../../../../utils/is.mjs"; function S(a, n) { const p = {}, o = {}; return c( () => a.value, () => { a.value.forEach((e) => { e.slot && n[e.slot] && (p[e.slot] = (r) => n[e.slot](r)), e.type === "button" && l(e.dropdown) && t(e.dropdown.reference) && (e.dropdown.reference.includes("slot") || e.dropdown.reference.includes("Slot")) && (p[e.dropdown.reference] = (r) => n[e.dropdown.reference](r)), e.type === "expand" && n.expand && (p.expand = (r) => n.expand(r)); const d = e.label; u(e.label) && n[d] && (p[d] = (r) => n[d](r)); }), f(n.empty) && (o.empty = () => n.empty()), f(n.append) && (o.append = () => n.append()); }, { immediate: !0, deep: !0 } ), { scopedSlots: p, tableSlots: o }; } export { S as useTableSlots }; //# sourceMappingURL=useTableSlots.mjs.map