mine-h5-ui
Version:
一款轻量级、模块化基于 Vue3.x 的 H5 前端 UI 组件库 👍
50 lines (49 loc) • 1.46 kB
JavaScript
import { defineComponent as y, createElementBlock as a, openBlock as s, normalizeStyle as o, normalizeClass as n, unref as e, createElementVNode as m, Fragment as _, renderList as g } from "vue";
import { name as t } from "./config.js";
import { useHandle as v, useStyle as S } from "./hooks.js";
/*!
* mine-h5-ui v2.15.0
* Copyright (c) 2025 biaov
* @license MIT
*/
const $ = ["src"], k = ["src"], A = /* @__PURE__ */ y({
name: t,
__name: "index",
props: {
url: {},
openAnimation: { type: Boolean, default: !1 },
width: { default: "100%" },
height: { default: "auto" },
gutter: {},
lineColor: { default: "#fff" },
minSize: { default: 100 },
lineWidth: { default: 1 }
},
emits: ["load"],
setup(u, { emit: d }) {
const f = d, r = u, { base64Data: p } = v(r, f), { getStyle: l } = S(r);
return (i, z) => (s(), a("div", {
class: n(e(t)),
style: o(e(l))
}, [
m("img", {
src: i.url,
class: n(`${e(t)}-placeholder`),
style: o(e(l))
}, null, 14, $),
m("canvas", {
class: n(`${e(t)}-canvas`),
ref: "canvasRef"
}, null, 2),
(s(!0), a(_, null, g(e(p), (c, h) => (s(), a("img", {
key: h,
src: c.base64,
class: n(`${e(t)}-img ${i.openAnimation ? c.animation : ""}`),
style: o(e(l))
}, null, 14, k))), 128))
], 6));
}
});
export {
A as default
};