mine-h5-ui
Version:
一款轻量级、模块化基于 Vue3.x 的 H5 前端 UI 组件库 👍
34 lines (33 loc) • 1.08 kB
JavaScript
import { defineComponent as c, openBlock as p, createElementBlock as m, createElementVNode as e, withModifiers as _, normalizeStyle as i, unref as t, normalizeClass as f, renderSlot as r } from "vue";
import { useHandMove as v } from "./hooks.js";
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: d, isActive: a } = v();
return (s, n) => (p(), m("div", u, [
e("div", {
ref: "swiperEventNode",
class: f(["swiper", { active: t(a) }]),
style: i(`transform:translateX(${t(d)}px);`),
onClick: n[0] || (n[0] = _(() => {
}, ["prevent", "stop"]))
}, [
e("div", h, [
r(s.$slots, "content")
]),
e("div", {
ref_key: "hidden",
ref: o,
class: "swiper__hidden",
style: i(`right:-${t(l)}px;`)
}, [
r(s.$slots, "hidden")
], 4)
], 6)
]));
}
});
export {
y as default
};