@aplus-frontend/ui
Version:
48 lines (47 loc) • 1.49 kB
JavaScript
import { defineComponent as f, useSlots as m, createBlock as d, openBlock as u, unref as r, mergeProps as P, withCtx as t, createVNode as _, normalizeProps as i, guardReactiveProps as p, createSlots as y, renderList as B, renderSlot as C } from "vue";
import { Popconfirm as x } from "@aplus-frontend/antdv";
import "../item/index.vue.mjs";
import { omit as A } from "lodash-unified";
import b from "../item/index.vue2.mjs";
const I = /* @__PURE__ */ f({
name: "ApActionItemPopconfirm",
__name: "index",
props: {
text: {},
color: { default: "primary" },
disabled: { type: Boolean, default: !1 },
visible: { type: Boolean, default: !0 },
onAction: {},
onClick: {},
loading: { type: Boolean, default: !1 },
icon: {},
iconFirst: { type: Boolean },
popconfirmProps: { default: () => ({}) }
},
setup(a) {
const s = m(), o = a;
async function l(e) {
o.popconfirmProps.onConfirm?.(e), await o.onAction?.(e);
}
return (e, g) => (u(), d(r(x), P(o.popconfirmProps, {
disabled: !o.popconfirmProps,
"overlay-style": { zIndex: 1060 },
onConfirm: l
}), {
default: t(() => [
_(b, i(p(r(A)(o, ["popconfirmProps", "onAction"]))), y({ _: 2 }, [
B(s, (h, n) => ({
name: n,
fn: t((c) => [
C(e.$slots, n, i(p(c || {})))
])
}))
]), 1040)
]),
_: 3
}, 16, ["disabled"]));
}
});
export {
I as default
};