UNPKG

mine-h5-ui

Version:

一款轻量级、模块化基于 Vue3.x 的 H5 前端 UI 组件库 👍

43 lines (42 loc) 1.29 kB
import { defineComponent as C, openBlock as t, createElementBlock as o, unref as l, normalizeStyle as n, normalizeClass as k, createCommentVNode as i, toDisplayString as x, renderSlot as y } from "vue"; import { useHandler as $ } from "./hooks.js"; const h = { key: 2, class: "custom" }, g = /* @__PURE__ */ C({ name: "MeGridItem", __name: "index", props: { icon: { default: "" }, iconColor: { default: "" }, text: { default: "" }, textColor: { default: "" } }, emits: ["click"], setup(e, { emit: a }) { const s = a, { widthValue: d, borderColor: m, handleClick: r } = $(s); return (u, c) => (t(), o("div", { class: "me-grid-item", style: n(`width:${l(d)}%;border-color:${l(m)};`), onClick: c[0] || (c[0] = //@ts-ignore (...f) => l(r) && l(r)(...f)) }, [ e.icon ? (t(), o("i", { key: 0, class: k(["iconfont icon", e.icon]), style: n(`color:${e.iconColor};`) }, null, 6)) : i("", !0), e.text ? (t(), o("span", { key: 1, class: "desc", style: n(`color:${e.textColor};`) }, x(e.text), 5)) : i("", !0), !e.icon && !e.text ? (t(), o("div", h, [ y(u.$slots, "default") ])) : i("", !0) ], 4)); } }); export { g as default };