@aplus-frontend/ui
Version:
36 lines (35 loc) • 733 B
JavaScript
import { merge as f } from "lodash-unified";
import { onUnmounted as c } from "vue";
import { useCreateTableModal as i } from "./use-create-table-modal.mjs";
function b(r) {
const a = f(r, {
...{
footer: null
},
apTableProps: {
rowSelection: void 0
},
destroyOnUnmounted: !1,
isRenderModalTitleSuffix: !1
}), { destroy: e, openModal: s, closeModal: l, ...n } = i(a), d = async (p) => {
try {
await s([], p);
} catch (o) {
if (!(typeof o == "string" && o.startsWith("Ignored Reject:")))
throw o;
}
}, t = () => {
l();
};
return c(() => {
t(), e();
}), {
open: d,
destroy: e,
close: t,
...n
};
}
export {
b as useTableModal
};