File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -663,6 +663,7 @@ const ProFieldComponent: React.ForwardRefRenderFunction<
663
663
? undefined
664
664
: ( rest ?. placeholder ?? fieldProps ?. placeholder ) ,
665
665
} ) ,
666
+ Object . keys ( context . valueTypeMap || { } ) ?. includes ( valueType as string ) ,
666
667
) ,
667
668
} ) ,
668
669
context . valueTypeMap || { } ,
Original file line number Diff line number Diff line change @@ -2,12 +2,16 @@ const proFieldProps = `valueType request plain renderFormItem render text formIt
2
2
3
3
const proFormProps = `fieldProps isDefaultDom groupProps contentRender submitterProps submitter` ;
4
4
5
- export function pickProProps ( props : Record < string , any > ) {
5
+ export function pickProProps (
6
+ props : Record < string , any > ,
7
+ customValueType = false ,
8
+ ) {
6
9
const propList = `${ proFieldProps } ${ proFormProps } ` . split ( / [ \s \n ] + / ) ;
7
10
8
11
const attrs = { } as Record < string , any > ;
9
12
Object . keys ( props || { } ) . forEach ( ( key ) => {
10
- if ( propList . includes ( key ) ) {
13
+ //如果是自定义的 valueType,则不需要过滤掉,全部传给使用者
14
+ if ( propList . includes ( key ) && ! customValueType ) {
11
15
return ;
12
16
}
13
17
attrs [ key ] = props [ key ] ;
You can’t perform that action at this time.
0 commit comments