UNPKG

mine-h5-ui

Version:

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

37 lines (36 loc) 1.02 kB
import { ref as s, onMounted as l, onUnmounted as i, watch as m } from "vue"; import { Bind as u, Unbind as r } from "../MeAPI/event.js"; /*! * mine-h5-ui v2.15.0 * Copyright (c) 2025 biaov * @license MIT */ const p = ({ emit: n, visibleModel: o }) => ({ onClick: (e) => { n("click", e); }, onDelete: (e) => { n("delete", e); }, onComplate: (e) => { o.value = !1, n("complate", e); } }), g = ({ props: n, visibleModel: o }) => { const a = s(!1), t = () => { if (n.isPadding) if (o.value) document.body.className += " me-keyboard-padding"; else { const { className: e } = document.body; let c = e.indexOf("me-keyboard-padding"); c = c > 0 ? c : void 0, document.body.className = e.slice(0, c); } }, d = () => { o.value = !1; }; return l(() => { t(), u(document, "click", d); }), i(() => { r(document, "click", d); }), m(o, t), { isActive: a }; }; export { p as useHandler, g as usePadding };