mine-h5-ui
Version:
一款轻量级、模块化基于 Vue3.x 的 H5 前端 UI 组件库 👍
48 lines (47 loc) • 1.65 kB
JavaScript
import { defineComponent as y, mergeModels as d, useModel as k, withDirectives as w, createElementBlock as s, openBlock as o, withModifiers as h, normalizeClass as u, unref as t, Fragment as v, renderList as C, createCommentVNode as M, toDisplayString as V, vShow as b } from "vue";
import { useHandler as g } from "./hooks.js";
/*!
* mine-h5-ui v2.15.0
* Copyright (c) 2025 biaov
* @license MIT
*/
const B = { key: 0 }, D = {
key: 1,
class: "iconfont icon-dian"
}, S = /* @__PURE__ */ y({
name: "MePassword",
__name: "index",
props: /* @__PURE__ */ d({
type: { default: "password" },
num: { default: 6 },
skinType: { default: "white" },
isFocus: { type: Boolean, default: !1 }
}, {
modelValue: { default: "" },
modelModifiers: {}
}),
emits: /* @__PURE__ */ d(["focus", "blur"], ["update:modelValue"]),
setup(l, { emit: m }) {
const p = m, c = l, f = k(l, "modelValue"), { listData: a, handleClick: r } = g({ props: c, emit: p, modelValue: f });
return (n, i) => w((o(), s("ul", {
class: u(["me-password", `me-password-${n.skinType}${n.type === "number" ? " me-password-number" : ""}`]),
onClick: i[0] || (i[0] = h(
//@ts-ignore
(...e) => t(r) && t(r)(...e),
["stop"]
))
}, [
(o(!0), s(v, null, C(t(a), (e) => (o(), s("li", {
key: e.id,
class: u({ active: e.state })
}, [
n.type === "number" ? (o(), s("span", B, V(e.value), 1)) : e.value !== "" ? (o(), s("i", D)) : M("", !0)
], 2))), 128))
], 2)), [
[b, t(a).length > 0]
]);
}
});
export {
S as default
};