mine-h5-ui
Version:
一款轻量级、模块化基于 Vue3.x 的 H5 前端 UI 组件库 👍
48 lines (47 loc) • 1.55 kB
JavaScript
import { defineComponent as u, mergeModels as n, useModel as f, createElementBlock as p, openBlock as k, unref as a, createVNode as h, createElementVNode as C, renderSlot as v } from "vue";
import V 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 z = ["data-checked", "data-disabled"], B = { class: "value" }, N = /* @__PURE__ */ u({
name: "MeRadio",
__name: "index",
props: /* @__PURE__ */ n({
name: {},
shape: { default: "round" },
icon: { default: "" },
iconSelect: { default: "" },
iconSize: { default: "20px" },
checkedColor: { default: "" },
disabled: { type: Boolean, default: !1 }
}, {
modelValue: { type: Boolean, default: !1 },
modelModifiers: {}
}),
emits: /* @__PURE__ */ n(["click"], ["update:modelValue"]),
setup(l, { emit: i }) {
const s = i, c = l, o = f(l, "modelValue"), { iconName: r, handleClick: d } = b({ props: c, emit: s, isChecked: o });
return (e, t) => (k(), p("div", {
class: "me-radio",
onClick: t[0] || (t[0] = //@ts-ignore
(...m) => a(d) && a(d)(...m)),
"data-checked": o.value + "",
"data-disabled": e.disabled + ""
}, [
h(V, {
name: a(r),
color: o.value ? e.checkedColor : "",
size: e.iconSize
}, null, 8, ["name", "color", "size"]),
C("div", B, [
v(e.$slots, "default")
])
], 8, z));
}
});
export {
N as default
};