mine-h5-ui
Version:
一款轻量级、模块化基于 Vue3.x 的 H5 前端 UI 组件库 👍
48 lines (47 loc) • 1.4 kB
JavaScript
import { defineComponent as f, createElementBlock as o, openBlock as t, normalizeStyle as r, unref as l, createCommentVNode as n, normalizeClass as p, toDisplayString as C, renderSlot as k } from "vue";
import { useHandler as y } from "./hooks.js";
/*!
* mine-h5-ui v2.15.0
* Copyright (c) 2025 biaov
* @license MIT
*/
const $ = {
key: 2,
class: "custom"
}, g = /* @__PURE__ */ f({
name: "MeGridItem",
__name: "index",
props: {
icon: { default: "" },
iconColor: { default: "" },
text: { default: "" },
textColor: { default: "" }
},
emits: ["click"],
setup(h, { emit: a }) {
const d = a, { widthValue: c, borderColor: m, handleClick: i } = y(d);
return (e, s) => (t(), o("div", {
class: "me-grid-item",
onClick: s[0] || (s[0] = //@ts-ignore
(...u) => l(i) && l(i)(...u)),
style: r(`width:${l(c)}%;border-color:${l(m)};`)
}, [
e.icon ? (t(), o("i", {
key: 0,
class: p(["iconfont icon", e.icon]),
style: r(`color:${e.iconColor};`)
}, null, 6)) : n("", !0),
e.text ? (t(), o("span", {
key: 1,
class: "desc",
style: r(`color:${e.textColor};`)
}, C(e.text), 5)) : n("", !0),
!e.icon && !e.text ? (t(), o("div", $, [
k(e.$slots, "default")
])) : n("", !0)
], 4));
}
});
export {
g as default
};