mine-h5-ui
Version:
一款轻量级、模块化基于 Vue3.x 的 H5 前端 UI 组件库 👍
73 lines (72 loc) • 2.1 kB
JavaScript
import { defineComponent as C, mergeModels as M, useModel as V, createElementBlock as r, openBlock as a, normalizeStyle as t, normalizeClass as c, unref as e, createCommentVNode as z, createElementVNode as s, Fragment as B, renderList as E, renderSlot as I } from "vue";
import { useStyle as N, useTurnPage as P } from "./hooks.js";
import { name as d } from "./config.js";
/*!
* mine-h5-ui v2.15.0
* Copyright (c) 2025 biaov
* @license MIT
*/
const $ = /* @__PURE__ */ C({
name: d,
__name: "index",
props: /* @__PURE__ */ M({
list: {},
width: { default: 300 },
height: { default: 400 }
}, {
current: { default: 0 },
currentModifiers: {}
}),
emits: ["update:current"],
setup(u) {
const m = u, i = V(u, "current"), { getStyle: y } = N(m), { getItemStyle: f, wrapStyle: p, fwrapStyle: S, itemStyle: h, shadowStyle: v, turnItemStyle: g, turnShadowStyle: w, showValue: n } = P(m, i);
return (o, F) => (a(), r("div", {
class: c(e(d)),
style: t(e(y)),
ref: "turnPage"
}, [
o.list.length > 1 ? (a(), r("div", {
key: 0,
class: "turn",
style: t(e(S))
}, [
s("div", {
class: "turn-item",
style: t(e(g))
}, [
s("div", {
class: "turn-item-shadow",
style: t(e(w))
}, null, 4)
], 4)
], 4)) : z("", !0),
(a(!0), r(B, null, E(o.list, (k, l) => (a(), r("div", {
class: c(["item", { active: l === i.value }]),
key: l,
style: t(e(f)(l))
}, [
s("div", {
class: "item-rotate",
style: t(e(n)(l, e(p)))
}, [
s("div", {
class: "item-content",
style: t(e(n)(l, e(h)))
}, [
I(o.$slots, "default", {
item: k,
index: l
})
], 4)
], 4),
s("div", {
class: "item-shadow",
style: t(e(n)(l, e(v)))
}, null, 4)
], 6))), 128))
], 6));
}
});
export {
$ as default
};