From f3586ba56d0ed7c71d678fa5a3c2c2da8a51fc75 Mon Sep 17 00:00:00 2001
From: gerson <1405270578@qq.com>
Date: 星期二, 21 一月 2025 19:08:54 +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