Skip to content

Commit aaa12be

Browse files
committed
fix(Form): ts类型修正
1 parent 2d09b3d commit aaa12be

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

packages/core/src/Form/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,8 @@ interface FormItemsProps {
207207
name: string;
208208
validate?: RulesOption['validate'];
209209
options?: Array<{ label: string; value: KeyType | any }>;
210-
attr?: un;
210+
attr?: any;
211211
required?: boolean;
212-
render?: JSX.Element;
213212
hide?:boolean
214213
}
215214
```

packages/core/src/Form/formList.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { FC, useContext } from 'react';
1+
import React, { useContext } from 'react';
22
import { KeyType, FormItemsProps } from './types';
33
import { isObjectEmpty } from './utils/is';
44
import { Context } from './hooks/context';
@@ -17,17 +17,18 @@ import Label from './comps/label';
1717
import Tip from './comps/tip';
1818
import { View, SafeAreaView, TextInput } from 'react-native';
1919
import styles from './styles';
20-
import { values } from 'lodash';
20+
21+
interface FormListProps {
22+
formListValue: Omit<FormItemsProps, 'validate' | 'required'>;
23+
}
2124

2225
const FormList = ({
2326
formListValue = {
2427
field: '',
2528
type: '',
2629
name: '',
2730
},
28-
}: {
29-
formListValue: FormItemsProps;
30-
}) => {
31+
}: FormListProps) => {
3132
const {
3233
innerMethods: { store = {}, updateStore, customComponentList },
3334
} = useContext(Context);

packages/core/src/Form/types/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ interface FormItemsProps {
3737
options?: Array<{ label: string; value: KeyType | any }>;
3838
attr?: any;
3939
required?: boolean;
40-
render?: JSX.Element;
4140
items?: FormItemsProps[];
4241
hide?: boolean;
4342
}

0 commit comments

Comments
 (0)