@aplus-frontend/ui
Version:
70 lines (69 loc) • 1.84 kB
JavaScript
import { defineComponent as y, computed as a, createElementBlock as n, openBlock as r, Fragment as g, renderList as x, normalizeStyle as k, createVNode as i, unref as s } from "vue";
import { Skeleton as o } from "@aplus-frontend/antdv";
import S from "@aplus-frontend/antdv/es/_util/hooks/useBreakpoint";
const z = { style: {
width: "100%",
justifyContent: "space-between",
display: "flex"
} }, E = /* @__PURE__ */ y({
name: "ApSkeletonDescItem",
__name: "item",
props: {
size: {},
active: { type: Boolean }
},
setup(u) {
const t = u;
t.size;
const m = {
lg: !0,
md: !0,
sm: !1,
xl: !1,
xs: !1,
xxl: !1
}, f = {
xs: 1,
sm: 2,
md: 3,
lg: 3,
xl: 3,
xxl: 4
}, d = S(), c = a(() => d.value || m), v = a(
() => Object.keys(c.value).filter(
(e) => c.value[e] === !0
)[0] || "md"
), p = a(
() => t.size === void 0 ? f[v.value] || 3 : t.size
);
return (e, B) => (r(), n("div", z, [
(r(!0), n(g, null, x(new Array(p.value).fill(null), (_, l) => (r(), n("div", {
key: l,
style: k({
flex: 1,
paddingInlineStart: l === 0 ? 0 : "24px",
paddingInlineEnd: l === p.value - 1 ? 0 : "24px"
})
}, [
i(s(o), {
active: e.active,
paragraph: !1,
title: { style: { marginBlockStart: 0 } }
}, null, 8, ["active"]),
i(s(o), {
active: e.active,
paragraph: !1,
title: { style: { marginBlockStart: "8px" } }
}, null, 8, ["active"]),
i(s(o), {
active: e.active,
paragraph: !1,
title: { style: { marginBlockStart: "8px" } }
}, null, 8, ["active"])
], 4))), 128))
]));
}
});
export {
E as default
};