UNPKG

comic-plus

Version:

<p align="center"> <img width="200px" src="./logo.png"/> </p>

16 lines (15 loc) 526 B
import { defineComponent, ref, inject, h } from "vue"; import { WATERFALL_PROVIDE } from "./type.mjs"; import { useResize } from "../../../hooks/resize.mjs"; const WaterfallItem = defineComponent({ name: "CuWaterfallItem", setup(_, { slots }) { const waterfallItemRef = ref(null); const { updateStyle } = inject(WATERFALL_PROVIDE); useResize(waterfallItemRef, updateStyle); return () => h("div", { class: "cu-waterfall-item", ref: waterfallItemRef }, slots); } }); export { WaterfallItem as default };