From 12a89593d13fa38810c7af54c7ea8cb72ae65a10 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期二, 14 一月 2025 14:56:45 +0800 Subject: [PATCH] 使用 url 参数传 session --- 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