mine-h5-ui
Version:
一款轻量级、模块化基于 Vue3.x 的 H5 前端 UI 组件库 👍
55 lines (54 loc) • 1.54 kB
JavaScript
import { defineComponent as m, createElementBlock as r, openBlock as s, normalizeStyle as p, normalizeClass as h, unref as e, createCommentVNode as u, createElementVNode as n, toDisplayString as a } from "vue";
import { name as l, typeGroup as d } from "./config.js";
import { useHandle as y } from "./hooks.js";
import { useCssVar as x } from "../MeComposable/useCssVar/index.js";
/*!
* mine-h5-ui v2.15.0
* Copyright (c) 2025 biaov
* @license MIT
*/
const _ = ["viewBox", "width", "height"], g = {
x: "50%",
y: "50%",
class: "text",
"dominant-baseline": "central"
}, v = {
x: "50%",
y: "50%",
class: "text cover",
"dominant-baseline": "central"
}, w = {
key: 1,
class: "border"
}, V = /* @__PURE__ */ m({
name: l,
__name: "index",
props: {
type: { default: "default" },
size: { default: 24 },
family: { default: "Arial" },
color: { default: "#409eff" },
background: { default: "#fff" },
text: {}
},
setup(c) {
const f = c, { rect: o, viewBox: i } = y(f);
return (t, b) => (s(), r("div", {
class: h(e(l)),
style: p(e(x)(e(o)))
}, [
t.type === e(d).default ? (s(), r("svg", {
key: 0,
viewBox: `0 0 ${e(i).width} ${e(i).height}`,
width: e(o).width,
height: e(o).height
}, [
n("text", g, a(t.text), 1),
n("text", v, a(t.text), 1)
], 8, _)) : t.type === e(d).border ? (s(), r("div", w, a(t.text), 1)) : u("", !0)
], 6));
}
});
export {
V as default
};