From 5918b6ada94397d50ca1b43c8436d18d2011300f Mon Sep 17 00:00:00 2001 From: G Date: Fri, 15 Dec 2023 11:26:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20:bug:=20=E4=BC=98=E5=8C=96Gfield?= =?UTF-8?q?=E5=86=99=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/gbeata/src/GField/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/gbeata/src/GField/index.tsx b/packages/gbeata/src/GField/index.tsx index 17d93f3d..67209f57 100644 --- a/packages/gbeata/src/GField/index.tsx +++ b/packages/gbeata/src/GField/index.tsx @@ -1,6 +1,10 @@ import { GFormField } from '../GForm/g-form'; import { GSearchTableField } from '../GSearchTable/g-search-table'; -export default function GField(_: GFormField | GSearchTableField) { +// 定义一个联合类型,包含 GFormField 和 GSearchTableField 的公共属性 +type CommonField = GFormField | GSearchTableField; + +// 优化后的函数接收 CommonField 类型的参数 +export default function GField() { return null; }