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