UNPKG

@aplus-frontend/ui

Version:

28 lines (27 loc) 518 B
import { customRef as g } from "vue"; function d() { const r = /* @__PURE__ */ new Set(); function o(t) { return g((i, c) => { let n = t; const u = () => { t !== n && (n = t, c()); }; return { get: () => (i(), t), set: (e) => { e !== t && (t = e, r.add(u)); } }; }); } function f() { for (const t of r) t(); r.clear(); } return { updateSet: r, manualRef: o, triggerUpdate: f }; } export { d as useManualRef };