mine-h5-ui
Version:
一款轻量级、模块化基于 Vue3.x 的 H5 前端 UI 组件库 👍
32 lines (31 loc) • 1.01 kB
JavaScript
import { defineComponent as m, unref as e, openBlock as d, createElementBlock as u, normalizeStyle as c, normalizeClass as f, createElementVNode as k, renderSlot as g, createCommentVNode as p } from "vue";
import { useShow as w } from "./hooks.js";
const x = ["src"], v = /* @__PURE__ */ m({
name: "MePreview",
__name: "index",
props: {
url: {},
zIndex: { default: 99 },
background: { default: "#000" }
},
setup(n) {
const { isShow: r, isDestroy: a, onClose: o, animationDuration: i } = w();
return (l, t) => e(a) ? p("", !0) : (d(), u("div", {
key: 0,
class: f(["me-preview", { show: e(r) }]),
style: c(`z-index:${n.zIndex};background:${n.background};--animation-duration:${e(i)}ms;`),
onClick: t[0] || (t[0] = //@ts-ignore
(...s) => e(o) && e(o)(...s))
}, [
k("img", {
class: "img",
src: n.url,
alt: "preview-img"
}, null, 8, x),
g(l.$slots, "default")
], 6));
}
});
export {
v as default
};