UNPKG

mine-h5-ui

Version:

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

51 lines (50 loc) 1.6 kB
import { defineComponent as f, createElementBlock as d, openBlock as n, unref as t, normalizeStyle as p, normalizeClass as s, createBlock as u, createCommentVNode as m, renderSlot as y } from "vue"; import c from "../MeIcon/index.vue.js"; import { useHandler as b } from "./hooks.js"; /*! * mine-h5-ui v2.15.0 * Copyright (c) 2025 biaov * @license MIT */ const k = ["type"], w = /* @__PURE__ */ f({ name: "MeButton", __name: "index", props: { nativeType: { default: "button" }, width: { default: "" }, type: { default: "default" }, plain: { type: Boolean, default: !1 }, disabled: { type: Boolean, default: !1 }, icon: { default: "" }, color: { default: "" } }, emits: ["click"], setup($, { emit: a }) { const r = a, { onClick: o } = b(r); return (e, l) => (n(), d("button", { type: e.nativeType, class: s([ "me-button", `me-button-${e.type}`, { "me-button-plain": e.plain, disabled: e.disabled } ]), style: p(`width:${e.width}; color:${e.type === "default" || e.plain ? e.color : "#fff"}; background:${e.plain ? "#fff" : e.color}; border-color:${e.color};`), onClick: l[0] || (l[0] = //@ts-ignore (...i) => t(o) && t(o)(...i)) }, [ e.icon ? (n(), u(c, { key: 0, name: e.icon, color: `${e.type === "default" || e.plain ? e.color : "#fff"}`, size: "16px" }, null, 8, ["name", "color"])) : m("", !0), y(e.$slots, "default") ], 14, k)); } }); export { w as default };