UNPKG

dk-plus

Version:
23 lines (22 loc) 582 B
import { toRaw as f } from "vue"; import { getSlotList as m } from "../public/get-slot-list/index.js"; const S = (s) => { const a = f(s), n = (e, o, t = !0) => { const r = JSON.parse(JSON.stringify(e)); return r.forEach((l) => { l.name === o ? l.modelValue = !l.modelValue : t && (l.modelValue = !1); }), r; }, u = (e) => { const o = m(e, "DkCollapseItem"); return c(o, a.modelValue); }, c = (e, o) => (e.forEach((t) => { t.modelValue = t.name === o; }), e); return { refresh: n, getSlot: u }; }; export { S as getCollapseSlot };