This commit is contained in:
2025-10-24 13:47:52 +08:00
parent 23fe51123b
commit d54f03779d
19 changed files with 19 additions and 19 deletions

View File

@@ -873,7 +873,7 @@ const Dr = (e, t, n, r) => ke.redirect(n, t, r), qr = (e, t = {}, n, r = {}) =>
const T = (L, ee = !1) => (m(L), !L && C("hover"), L ? l == null ? void 0 : l(b) : s == null ? void 0 : s(ee)), D = (L) => {
m(!0), C("click");
};
return d(Hn, { zIndex: W, placement: F, onPopupClick: D, onClick: D, open: h, align: I, arrow: z, trigger: f, getPopupContainer: M || O ? void 0 : (L) => L, content: d(Hr, { ...B, extras: c, children: S && x.cloneElement(S, { ...b, $close: (L) => T(!1, L) }) }), children: g, onOpenChange: T });
return d(Hn, { zIndex: W, placement: F, onPopupClick: D, onClick: D, open: h, align: I, arrow: z, trigger: f, getPopupContainer: M || O ? void 0 : (L) => L, styles: { body: { padding: 0 } }, content: d(Hr, { ...B, extras: c, children: S && x.cloneElement(S, { ...b, $close: (L) => T(!1, L) }) }), children: g, onOpenChange: T });
}, Hr = ({ title: e, className: t, children: n, extras: r, width: i, height: a, ...o }) => {
const [s, l] = R({}), g = X((m, f) => l((C) => ({ ...C, [m]: f })), []), c = X((m) => l((f) => ({ ...f, [m]: void 0 })), []), p = e ? x.createElement("div", { className: "ff-popup-title" }, e) : s == null ? void 0 : s.title, h = r ?? x.createElement("div", { className: "ff-popup-reserved-extras" }, r);
return d(_e.Provider, { value: { ele: s, mount: g, unmount: c }, children: $("div", { className: V("ff-popup ff-popover", t, s.rootClassName), style: { width: i, height: a }, ...o, children: [$("div", { className: "ff-popup-header", children: [p, s == null ? void 0 : s["sub-title"]] }), n, $("div", { className: "ff-popup-footer", children: [h, s == null ? void 0 : s.extras, s == null ? void 0 : s.actions] })] }) });