vuux
Version:
Vue3 Nuxt3 Nuxt4 组件库
29 lines (28 loc) • 846 B
JavaScript
import { defineComponent as s, createElementBlock as d, createCommentVNode as p, openBlock as i, withModifiers as u, normalizeStyle as c, unref as l } from "vue";
import { useOverlay as f } from "./hook/useOverlay.mjs";
const C = /* @__PURE__ */ s({
name: "Overlay",
__name: "index",
props: {
modelValue: { type: Boolean },
zIndex: { default: 2002 },
maskClose: { type: Boolean, default: !0 }
},
emits: ["update:modelValue"],
setup(n, { emit: a }) {
const e = n, r = a, { handleClose: o } = f(e, r);
return (y, t) => e.modelValue ? (i(), d("div", {
key: 0,
class: "app-overlay",
style: c("z-index:" + e.zIndex),
onClick: t[0] || (t[0] = u(
//@ts-ignore
(...m) => l(o) && l(o)(...m),
["stop"]
))
}, null, 4)) : p("", !0);
}
});
export {
C as default
};