UNPKG

ant-design-x-vue

Version:

Craft AI-driven interfaces effortlessly

32 lines (31 loc) 789 B
import { shallowRef as i, defineComponent as c, computed as r, provide as p, watch as a, unref as d, triggerRef as m, inject as f } from "vue"; import { objectType as x } from "../../../_util/type.mjs"; const u = Symbol("ActionButtonContext"), o = i(), A = (t) => { p(u, t), a( t, () => { o.value = d(t), m(o); }, { immediate: !0, deep: !0 } ); }, l = () => f( u, r(() => o.value || {}) ), v = c({ props: { value: x() }, setup(t, { slots: e }) { return A(r(() => t.value)), () => { var n; return (n = e.default) == null ? void 0 : n.call(e); }; } }); export { v as ActionButtonContextProvider, v as default, o as globalActionButtonContextApi, l as useActionButtonContextInject, A as useActionButtonContextProvider };