mine-h5-ui
Version:
一款轻量级、模块化基于 Vue3.x 的 H5 前端 UI 组件库 👍
56 lines (55 loc) • 1.78 kB
JavaScript
import { defineComponent as S, createElementBlock as n, openBlock as o, normalizeClass as u, unref as l, createElementVNode as s, Fragment as i, renderList as c, withDirectives as w, toDisplayString as r, vShow as y } from "vue";
import D from "./countryData.js";
import { useScroll as L, useBtns as E } from "./hooks.js";
import { name as d } from "./config.js";
/*!
* mine-h5-ui v2.15.0
* Copyright (c) 2025 biaov
* @license MIT
*/
const $ = { class: "list-rt" }, x = ["onClick"], z = { class: "list-item" }, F = ["onClick"], q = /* @__PURE__ */ S({
name: d,
__name: "index",
props: {
list: { default: () => D },
range: { default: 10 }
},
emits: ["click"],
setup(m, { emit: f }) {
const p = f, _ = m, { curLetter: k, listCont: C, filterShow: h, onClickBadge: v } = L(_), { handleLi: B } = E(p);
return (a, N) => (o(), n("div", {
class: u(l(d)),
ref: "indexBarRef"
}, [
s("ul", $, [
(o(!0), n(i, null, c(a.list, (e, t) => w((o(), n("li", {
key: e.name,
class: u({ on: e.name === l(k) }),
onClick: (g) => l(v)(e, t)
}, r(e.name), 11, x)), [
[y, l(h)(t)]
])), 128))
]),
s("ul", {
class: "list-cont",
ref_key: "listCont",
ref: C
}, [
(o(!0), n(i, null, c(a.list, (e) => (o(), n("li", {
key: e.name
}, [
s("dl", z, [
s("dt", null, r(e.name), 1),
(o(!0), n(i, null, c(e.cities, (t) => (o(), n("dd", {
key: t.code,
onClick: (g) => l(B)(t)
}, r(t.code) + "(" + r(t.cn) + ")", 9, F))), 128))
])
]))), 128))
], 512)
], 2));
}
});
export {
q as default
};