chore: move useRect to @vant/use

This commit is contained in:
chenjiahan
2020-10-05 11:22:30 +08:00
parent 6aa67b6df9
commit fd92564c27
15 changed files with 35 additions and 40 deletions
@@ -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 -1
View File
@@ -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';