UNPKG

mine-h5-ui

Version:

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

43 lines (42 loc) 1.44 kB
import { defineComponent as u, useModel as f, openBlock as k, createElementBlock as h, unref as a, createVNode as p, createElementVNode as C, renderSlot as v, mergeModels as t } from "vue"; import V from "../MeIcon/index.vue.js"; import { useHandler as b } from "./hooks.js"; const z = ["data-checked", "data-disabled"], B = { class: "value" }, N = /* @__PURE__ */ u({ name: "MeRadio", __name: "index", props: /* @__PURE__ */ t({ 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__ */ t(["click"], ["update:modelValue"]), setup(e, { emit: n }) { const c = n, i = e, o = f(e, "modelValue"), { iconName: s, handleClick: l } = b({ props: i, emit: c, isChecked: o }); return (m, d) => (k(), h("div", { class: "me-radio", "data-checked": o.value + "", "data-disabled": e.disabled + "", onClick: d[0] || (d[0] = //@ts-ignore (...r) => a(l) && a(l)(...r)) }, [ p(V, { name: a(s), color: o.value ? e.checkedColor : "", size: e.iconSize }, null, 8, ["name", "color", "size"]), C("div", B, [ v(m.$slots, "default") ]) ], 8, z)); } }); export { N as default };