UNPKG

sci-pro

Version:
28 lines (27 loc) 705 B
import { nextTick as n } from "vue"; import { createLoadingComponent as s } from "./loading.mjs"; let c; const d = function(e = {}) { const r = u(e); if (r.fullscreen && c) return c; const l = s({ ...r, closed: () => { r.fullscreen && (c = void 0); } }); return n(() => l.visible.value = r.visible), document.body.appendChild(l.$el), c = l, l; }, u = (e) => ({ visible: (e == null ? void 0 : e.visible) ?? !0, fullscreen: (e == null ? void 0 : e.fullscreen) ?? !0, text: e.text || "", svg: e.svg || "", svgViewBox: e.svgViewBox || "", spinner: e.spinner || !1, background: e.background || "", customClass: e.customClass || "" }); export { d as Loading };