mine-h5-ui
Version:
一款轻量级、模块化基于 Vue3.x 的 H5 前端 UI 组件库 👍
39 lines (38 loc) • 1.19 kB
JavaScript
import { defineComponent as c, createElementBlock as p, openBlock as m, createElementVNode as e, withModifiers as _, normalizeStyle as i, normalizeClass as f, unref as t, renderSlot as r } from "vue";
import { useHandMove as v } from "./hooks.js";
/*!
* mine-h5-ui v2.15.0
* Copyright (c) 2025 biaov
* @license MIT
*/
const u = { class: "me-swipe-cell" }, h = { class: "swiper__content" }, y = /* @__PURE__ */ c({
name: "MeSwipeCell",
__name: "index",
setup(w) {
const { hidden: o, maxDistance: l, currentValue: a, isActive: d } = v();
return (s, n) => (m(), p("div", u, [
e("div", {
class: f(["swiper", { active: t(d) }]),
style: i(`transform:translateX(${t(a)}px);`),
ref: "swiperEventRef",
onClick: n[0] || (n[0] = _(() => {
}, ["prevent", "stop"]))
}, [
e("div", h, [
r(s.$slots, "content")
]),
e("div", {
class: "swiper__hidden",
ref_key: "hidden",
ref: o,
style: i(`right:-${t(l)}px;`)
}, [
r(s.$slots, "hidden")
], 4)
], 6)
]));
}
});
export {
y as default
};