@pit-front-end/components
Version:
湖南创智艾泰克科技有限公司
50 lines (49 loc) • 1.48 kB
JavaScript
import { defineComponent as m, resolveComponent as p, createBlock as u, openBlock as c, unref as g, isRef as b, createSlots as C, withCtx as a, renderSlot as s } from "vue";
import { dialogEmits as h, dialogProps as V } from "./dialog.js";
import { useDialog as _ } from "./use-dialog.js";
const x = /* @__PURE__ */ m({
name: "PitDialog",
inheritAttrs: !1,
__name: "dialog",
props: V,
emits: h,
setup(n, { emit: r }) {
const e = n, { modelValue: o } = _(e);
function d() {
e.beforeClose ? e.beforeClose(() => !0) : r("update:modelValue", !1);
}
return (l, t) => {
const i = p("el-dialog");
return c(), u(i, {
modelValue: g(o),
"onUpdate:modelValue": t[0] || (t[0] = (f) => b(o) ? o.value = f : null),
"append-to-body": "",
title: e.title,
width: e.width,
"close-on-click-modal": !1,
top: e.top,
"modal-class": e.modalClass,
draggable: e.draggable,
fullscreen: e.fullscreen,
"before-close": d,
"z-index": e.zIndex
}, C({
default: a(() => [
s(l.$slots, "default")
]),
_: 2
}, [
l.$slots.footer ? {
name: "footer",
fn: a(() => [
s(l.$slots, "footer")
]),
key: "0"
} : void 0
]), 1032, ["modelValue", "title", "width", "top", "modal-class", "draggable", "fullscreen", "z-index"]);
};
}
});
export {
x as default
};