props 添加 propsTransform 方法,方便用户调整属性

This commit is contained in:
liaoxuezhi 2019-09-12 11:09:30 +08:00
parent e7203d9718
commit 1485c25e87

View File

@ -253,6 +253,13 @@ export function renderChild(prefix: string, node: SchemaNode, props: renderChild
return null; return null;
} }
const transform = props.propsTransform;
if (transform) {
delete props.propsTransform;
props = transform(props);
}
return ( return (
<SchemaRenderer <SchemaRenderer
{...props} {...props}