UNPKG

@aplus-frontend/ui

Version:

45 lines (44 loc) 1.32 kB
import { defineComponent as i, useSlots as s, createBlock as c, openBlock as p, mergeProps as m, unref as d, createSlots as f, renderList as u, withCtx as _, renderSlot as y, normalizeProps as A, guardReactiveProps as P } from "vue"; import { Modal as B } from "@aplus-frontend/antdv"; import "../item/index.vue.mjs"; import { omit as k } from "lodash-unified"; import x from "../item/index.vue2.mjs"; const z = /* @__PURE__ */ i({ name: "ApActionItemModal", __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 }, modalProps: { default: () => ({}) } }, setup(t) { const r = s(), o = t; async function a(e) { B.confirm({ ...o.modalProps, zIndex: 1060, onOk: async () => { o.modalProps.onOk?.(), await o.onAction?.(e); } }); } return (e, g) => (p(), c(x, m(d(k)(o, ["modalProps", "onAction"]), { onAction: a }), f({ _: 2 }, [ u(r, (h, n) => ({ name: n, fn: _((l) => [ y(e.$slots, n, A(P(l || {}))) ]) })) ]), 1040)); } }); export { z as default };