UNPKG

mine-h5-ui

Version:

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

53 lines (52 loc) 1.69 kB
import { defineComponent as g, openBlock as l, createElementBlock as p, unref as o, normalizeStyle as v, normalizeClass as c, createElementVNode as t, renderSlot as s, createBlock as r, createCommentVNode as m, toDisplayString as d } from "vue"; import u from "../MeIcon/index.vue.js"; import { useStyle as B, useHandle as S } from "./hooks.js"; const b = { class: "lf" }, z = { class: "rt" }, E = /* @__PURE__ */ g({ name: "MeCell", __name: "index", props: { title: { default: "" }, value: { default: "" }, icon: { default: "" }, iconColor: { default: "#494949" }, placeholder: { default: "" }, arrow: { type: Boolean, default: !1 }, height: { default: "100%" }, bottom: { type: Boolean, default: !1 } }, emits: ["click"], setup(e, { emit: f }) { const h = f, y = e, { onClick: a } = S(h), { getStyle: k } = B(y); return (n, i) => (l(), p("div", { class: c(["me-cell", { bottom: e.bottom }]), style: v(o(k)), onClick: i[0] || (i[0] = //@ts-ignore (...C) => o(a) && o(a)(...C)) }, [ t("div", b, [ s(n.$slots, "left", {}, () => [ e.icon ? (l(), r(u, { key: 0, name: e.icon, size: "20px" }, null, 8, ["name"])) : m("", !0), t("span", null, d(e.title), 1) ]) ]), t("div", z, [ s(n.$slots, "right", {}, () => [ t("span", { class: c({ placeholder: e.placeholder }) }, d(e.value || e.placeholder), 3), e.arrow ? (l(), r(u, { key: 0, name: "icon-right1" })) : m("", !0) ]) ]) ], 6)); } }); export { E as default };