tyh-ui2
Version:
The next generation ui component library of tyh-ui is based on vue3 Version, fully embrace vue3.
55 lines (54 loc) • 1.73 kB
JavaScript
import { defineComponent as h, computed as u, openBlock as s, createElementBlock as t, renderSlot as i, toDisplayString as o, createCommentVNode as r, createElementVNode as c, Fragment as p, renderList as m, normalizeClass as k, unref as f, createTextVNode as _ } from "vue";
import { Props as v } from "./index2.js";
const $ = { class: "tyh-list" }, B = {
key: 0,
class: "tyh-list-header"
}, C = { key: 1 }, S = {
key: 1,
class: "tyh-list-content"
}, g = { class: "tyh-list-ul" }, z = {
key: 0,
class: "tyh-list-num"
}, E = {
key: 2,
class: "tyh-list-not"
}, N = {
key: 3,
class: "tyh-list-footer"
}, V = { key: 1 }, b = h({
name: "TyhList"
}), D = /* @__PURE__ */ h({
...b,
props: v,
setup(d) {
const n = d, y = u(() => [
"tyh-list-li",
{
"tyh-list-zebra": n.zebra,
"tyh-list-hoverShow": n.hoverShow
}
]);
return (e, w) => (s(), t("div", $, [
e.header || e.$slots.header ? (s(), t("div", B, [
e.$slots.header ? i(e.$slots, "header", { key: 0 }) : (s(), t("span", C, o(e.header), 1))
])) : r("", !0),
e.content.length ? (s(), t("div", S, [
c("ul", g, [
(s(!0), t(p, null, m(e.content, (l, a) => (s(), t("li", {
key: a,
class: k(f(y))
}, [
e.num ? (s(), t("span", z, o(a + 1), 1)) : r("", !0),
_(" " + o(e.keys ? l[e.keys] : l), 1)
], 2))), 128))
])
])) : (s(), t("div", E, "\u6682\u65E0\u5185\u5BB9...")),
e.footer || e.$slots.footer ? (s(), t("div", N, [
e.$slots.footer ? i(e.$slots, "footer", { key: 0 }) : (s(), t("span", V, o(e.footer), 1))
])) : r("", !0)
]));
}
});
export {
D as default
};