ソースを参照

Merge branch 'main' of github.com:DouyinFE/semi-design

pointhalo 4 年 前
コミット
b9bc22837d
1 ファイル変更11 行追加1 行削除
  1. 11 1
      packages/semi-ui/form/arrayField.tsx

+ 11 - 1
packages/semi-ui/form/arrayField.tsx

@@ -9,7 +9,17 @@ import { ArrayFieldStaff, FormUpdaterContextType } from '@douyinfe/semi-foundati
 export interface ArrayFieldProps {
     initValue?: any[];
     field?: string;
-    children?: ({ }) => React.ReactNode;
+    children?: (props: ArrayFieldChildrenProps) => React.ReactNode;
+}
+
+export interface ArrayFieldChildrenProps {
+    arrayFields: {
+        key: string;
+        field: string;
+        remove: () => void;
+    }[];
+    add: () => void;
+    addWithInitValue: (lineObject: Record<string, any>) => void;
 }
 
 export interface ArrayFieldState {