Skip to content

Commit

Permalink
fix: 🐛 优化Gfield写法
Browse files Browse the repository at this point in the history
  • Loading branch information
G committed Dec 15, 2023
1 parent 19b6085 commit 5918b6a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/gbeata/src/GField/index.tsx
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 5918b6a

Please sign in to comment.