UNPKG

@matechat/core

Version:

前端智能化场景解决方案UI库,轻松构建你的AI应用。

49 lines (48 loc) 1.04 kB
import { Comment as s, Text as a, Fragment as m, h as g, defineComponent as h, ref as v, withDirectives as C, cloneVNode as y } from "vue"; import { isObject as x } from "@vue/shared"; function p(e) { return g("span", {}, e); } function c(e) { for (const t of e) { if (x(t)) { if (t.type === s) continue; return t.type === "svg" || t.type === a ? p(t) : t.type === m ? c(t.children) : t; } return p(t); } return null; } const F = /* @__PURE__ */ h({ setup(e, t) { const { slots: r, attrs: i, expose: d } = t, n = v(); return d({ triggerEl: n }), () => { var f; const o = (f = r.default) == null ? void 0 : f.call(r, i); if (!o) return null; const l = c(o); return l ? C(y(l, i), [[{ mounted(u) { n.value = u; }, updated(u) { n.value = u; }, unmounted() { n.value = null; } }]]) : null; }; } }); export { F as PopperTrigger };