UNPKG

mine-h5-ui

Version:

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

62 lines (61 loc) 1.91 kB
import { defineComponent as u, createElementBlock as i, openBlock as n, normalizeStyle as o, createElementVNode as l, unref as r, createCommentVNode as y, toDisplayString as a, renderSlot as k } from "vue"; import { useHandler as C } from "./hooks.js"; /*! * mine-h5-ui v2.15.0 * Copyright (c) 2025 biaov * @license MIT */ const p = { key: 0, class: "iconfont icon-left" }, g = { class: "rt" }, $ = /* @__PURE__ */ u({ name: "MeNavBar", __name: "index", props: { title: { default: "" }, leftArrow: { type: Boolean, default: !0 }, leftText: { default: "" }, rightText: { default: "" }, styles: { default: () => ({ borderColor: "#dcdfe6", background: "#fff", titleColor: "#494949", leftColor: "#949494", rightColor: "#949494" }) } }, emits: ["click-left", "click-right"], setup(b, { emit: c }) { const m = c, { onClickLeft: d, onClickRight: f } = C(m); return (e, t) => (n(), i("div", { class: "me-nav-bar", style: o(`background:${e.styles.background};border-bottom-color:${e.styles.borderColor};`) }, [ l("div", { class: "lf", onClick: t[0] || (t[0] = //@ts-ignore (...s) => r(d) && r(d)(...s)), style: o(`color:${e.styles.leftColor};`) }, [ e.leftArrow ? (n(), i("i", p)) : y("", !0), l("span", null, a(e.leftText), 1) ], 4), l("h2", { class: "tit", style: o(`color:${e.styles.titleColor};`) }, a(e.title), 5), l("div", g, [ e.rightText ? (n(), i("div", { key: 0, class: "btn", onClick: t[1] || (t[1] = //@ts-ignore (...s) => r(f) && r(f)(...s)), style: o(`color:${e.styles.rightColor};`) }, a(e.rightText), 5)) : k(e.$slots, "default", { key: 1 }) ]) ], 4)); } }); export { $ as default };