ckgl/node_modules/vant/es/composables/use-placeholder.mjs
2024-12-21 13:52:42 +08:00

15 lines
404 B
JavaScript

import { createVNode as _createVNode } from "vue";
import { useHeight } from "./use-height.mjs";
function usePlaceholder(contentRef, bem) {
const height = useHeight(contentRef, true);
return (renderContent) => _createVNode("div", {
"class": bem("placeholder"),
"style": {
height: height.value ? `${height.value}px` : void 0
}
}, [renderContent()]);
}
export {
usePlaceholder
};