mine-h5-ui
Version:
一款轻量级、模块化基于 Vue3.x 的 H5 前端 UI 组件库 👍
44 lines (43 loc) • 1.44 kB
JavaScript
import { defineComponent as p, createElementBlock as t, openBlock as a, normalizeStyle as u, normalizeClass as m, createElementVNode as r, createCommentVNode as f, toDisplayString as c, unref as n } from "vue";
import { useHandler as h } from "./hooks.js";
/*!
* mine-h5-ui v2.15.0
* Copyright (c) 2025 biaov
* @license MIT
*/
const y = { class: "txt" }, $ = /* @__PURE__ */ p({
name: "MeTag",
__name: "index",
props: {
type: { default: "primary" },
plain: { type: Boolean, default: !1 },
radius: { default: 4 },
width: {},
height: { default: 24 },
color: { default: "" },
text: { default: "标签" },
textColor: { default: "" },
closeable: { type: Boolean, default: !1 }
},
emits: ["close"],
setup(g, { emit: s }) {
const i = s, { onClose: o } = h(i);
return (e, l) => (a(), t("div", {
class: m(["me-tag", [e.type, e.plain && "plain"]]),
style: u(`width:${e.width}px;height:${e.height}px;border-color:${e.color};border-radius:${e.radius}px;background:${e.color};color:${e.textColor};`)
}, [
r("div", y, [
r("span", null, c(e.text), 1),
e.closeable ? (a(), t("i", {
key: 0,
class: "iconfont icon-baseline-close-px",
onClick: l[0] || (l[0] = //@ts-ignore
(...d) => n(o) && n(o)(...d))
})) : f("", !0)
])
], 6));
}
});
export {
$ as default
};