types: improve ref typing (#8124)
* types: improve ref typing * types: message
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { useRect } from '@vant/use';
|
||||
import { Ref, ref, onMounted, nextTick } from 'vue';
|
||||
|
||||
export const useHeight = (element: Element | Ref<Element>) => {
|
||||
const height = ref();
|
||||
export const useHeight = (element: Element | Ref<Element | undefined>) => {
|
||||
const height = ref<number>();
|
||||
|
||||
onMounted(() => {
|
||||
nextTick(() => {
|
||||
|
||||
Reference in New Issue
Block a user