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>

3 lines (2 loc) 859 B
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../../../utils/index.cjs");const u=require("vue"),d=require("../../../../utils/is.cjs");function t(c,n){const o={},p={};return u.watch(()=>c.value,()=>{c.value.forEach(e=>{e.slot&&n[e.slot]&&(o[e.slot]=r=>n[e.slot](r)),e.type==="button"&&d.isObject(e.dropdown)&&d.isString(e.dropdown.reference)&&(e.dropdown.reference.includes("slot")||e.dropdown.reference.includes("Slot"))&&(o[e.dropdown.reference]=r=>n[e.dropdown.reference](r)),e.type==="expand"&&n.expand&&(o.expand=r=>n.expand(r));const a=e.label;d.isSlot(e.label)&&n[a]&&(o[a]=r=>n[a](r))}),d.isFunction(n.empty)&&(p.empty=()=>n.empty()),d.isFunction(n.append)&&(p.append=()=>n.append())},{immediate:!0,deep:!0}),{scopedSlots:o,tableSlots:p}}exports.useTableSlots=t; //# sourceMappingURL=useTableSlots.cjs.map