UNPKG

@aplus-frontend/ui

Version:

30 lines (29 loc) 857 B
import { defineComponent as s, createVNode as p, render as u, h as C } from "vue"; import { Modal as f } from "@aplus-frontend/antdv"; import { ConfigProvider as g, globalConfigCached as e } from "../../config-provider/config-provider.mjs"; import { getContainerDom as n } from "./util.mjs"; import { getTopWindow as h } from "../../utils/index.mjs"; const w = (r) => (o) => { let t; const d = /* @__PURE__ */ s({ data() { const [l, c] = f.useModal(); return { modal: l, contextHolder: c }; }, mounted() { t = this.modal?.[r]?.(o); }, render() { return p(g, e.value, { default: () => [this.contextHolder?.()] }); } }), m = n(e?.value?.getPopupContainer), a = n(o.getContainer), i = m || a || h().document.body; return u(C(d), i), t; }; export { w as methodsFn };