UNPKG

vuux

Version:

Vue3 Nuxt3 Nuxt4 组件库

40 lines (39 loc) 1.21 kB
import { defineComponent as d, useSlots as m, useTemplateRef as p, createElementBlock as o, openBlock as r, normalizeStyle as u, unref as e, renderSlot as n, createCommentVNode as _, withDirectives as w, createVNode as y, createElementVNode as g, vShow as h } from "vue"; import { useWaterfall as k } from "./hook/useWaterfall.mjs"; import { Icon as v } from "@vuux/icons"; const E = { key: 1, class: "waterfall-loading" }, S = { class: "waterfall-list" }, I = /* @__PURE__ */ d({ name: "Waterfall", __name: "index", props: { column: { default: 3 }, gap: { default: 10 }, item: { default: "" } }, setup(s) { const c = s, i = m(), l = p("waterfallEl"), { loading: t, containerStyle: f } = k(c, l); return (a, N) => (r(), o("div", { ref_key: "waterfallEl", ref: l, class: "app-waterfall", style: u(e(f)) }, [ e(i).loading && e(t) ? n(a.$slots, "loading", { key: 0 }) : e(t) ? (r(), o("div", E, [ y(e(v), { name: "Icon6307746", opacity: 0.8 }) ])) : _("", !0), w(g("div", S, [ n(a.$slots, "default") ], 512), [ [h, !e(t)] ]) ], 4)); } }); export { I as default };