ant-design-x-vue
Version:
Craft AI-driven interfaces effortlessly
33 lines (32 loc) • 793 B
JavaScript
import { shallowRef as c, defineComponent as m, computed as o, provide as u, watch as i, unref as p, triggerRef as d, inject as f } from "vue";
import { objectType as h } from "../_util/type.mjs";
const a = Symbol("AttachmentContext"), n = c(), A = (t) => {
u(a, t), i(
t,
() => {
n.value = p(t), d(n);
},
{ immediate: !0, deep: !0 }
);
}, l = () => f(
a,
o(() => n.value || {})
), s = m({
inheritAttrs: !1,
props: {
value: h()
},
setup(t, { slots: e }) {
return A(o(() => t.value)), () => {
var r;
return (r = e.default) == null ? void 0 : r.call(e);
};
}
});
export {
s as AttachmentContextProvider,
s as default,
n as globalAttachmentContextApi,
l as useAttachmentContextInject,
A as useAttachmentContextProvider
};