chore: rename composables folder
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { useRect } from '@vant/use';
|
||||
import { Ref, ref, onMounted, nextTick } from 'vue';
|
||||
|
||||
export const useHeight = (element: Element | Ref<Element>) => {
|
||||
const height = ref();
|
||||
|
||||
onMounted(() => {
|
||||
nextTick(() => {
|
||||
height.value = useRect(element).height;
|
||||
});
|
||||
});
|
||||
|
||||
return height;
|
||||
};
|
||||
Reference in New Issue
Block a user