UNPKG

mine-h5-ui

Version:

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

50 lines (49 loc) 1.67 kB
import { defineComponent as u, createElementBlock as o, openBlock as t, normalizeStyle as l, Fragment as f, renderList as p, normalizeClass as n, unref as g, createElementVNode as k, createCommentVNode as m, toDisplayString as s } from "vue"; import { useHandler as b } from "./hooks.js"; /*! * mine-h5-ui v2.16.0 * Copyright (c) 2025 biaov * @license MIT */ const _ = ["onClick"], y = { key: 0 }, C = ["src"], h = { class: "txt" }, N = /* @__PURE__ */ u({ name: "MeTabBar", __name: "index", props: { list: {}, borderColor: { default: "#dcdfe6" }, background: { default: "#fff" }, color: { default: "#949494" }, colorSelected: { default: "#409eff" } }, emits: ["change"], setup(S, { emit: c }) { const a = c, { onClick: d } = b(a); return (r, $) => (t(), o("ul", { class: "me-tab-bar", style: l(`border-top-color:${r.borderColor};background:${r.background};`) }, [ (t(!0), o(f, null, p(r.list, (e, i) => (t(), o("li", { key: i, onClick: (B) => g(d)(e), class: n({ selected: e.state }), style: l(`color:${e.state ? r.colorSelected : r.color};`) }, [ e.icon ? (t(), o("i", { key: 0, class: n(["iconfont icon", [e.icon, e.dot && "dot"]]) }, [ e.badge && !e.dot ? (t(), o("em", y, s(e.badge), 1)) : m("", !0) ], 2)) : (t(), o("img", { key: 1, src: e.state ? e.imgSelected : e.img, alt: "图标", class: "img" }, null, 8, C)), k("span", h, s(e.text), 1) ], 14, _))), 128)) ], 4)); } }); export { N as default };