chore: move useRect to @vant/use
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import { Ref, ref, unref, onMounted, nextTick } from 'vue';
|
||||
|
||||
export const useRect = (element: Element | Ref<Element>) => {
|
||||
return unref(element).getBoundingClientRect();
|
||||
};
|
||||
import { useRect } from '@vant/use';
|
||||
import { Ref, ref, onMounted, nextTick } from 'vue';
|
||||
|
||||
export const useHeight = (element: Element | Ref<Element>) => {
|
||||
const height = ref();
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useHeight } from './use-rect';
|
||||
import { useHeight } from './use-height';
|
||||
import type { Ref, VNode } from 'vue';
|
||||
import type { BEM } from '../utils/create/bem';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user