From b06665e8c149df1273bf190313190bfa3de722e8 Mon Sep 17 00:00:00 2001 From: gerson <1405270578@qq.com> Date: 星期六, 27 七月 2024 12:31:15 +0800 Subject: [PATCH] 監測點擊出曲綫 --- src/utils/types.ts | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/utils/types.ts b/src/utils/types.ts index c041822..ffbf5b9 100644 --- a/src/utils/types.ts +++ b/src/utils/types.ts @@ -1,4 +1,5 @@ import { isNil } from 'lodash-unified'; +import { ref } from 'vue'; export const isUndefined = (val: any): val is undefined => val === undefined; export const isBoolean = (val: any): val is boolean => typeof val === 'boolean'; @@ -9,3 +10,10 @@ }; export const isFilledArray = (val: any) => Array.isArray(val) && val.length > 0; +/** + * + * @param _comp 缁勪欢鏋勯�犲嚱鏁� + * @returns 缁勪欢 ref + * @example const formRef = useCompRef(ElForm); + */ +export const useCompRef = <T extends abstract new (...args: any) => any>(_comp: T) => ref<InstanceType<T>>(); \ No newline at end of file -- Gitblit v1.9.3