From 529b4835107b0b38cadebd7472af3863798f3751 Mon Sep 17 00:00:00 2001 From: liaoxuezhi Date: Fri, 20 Sep 2019 11:37:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E9=80=A0=E6=88=90=20breakcha?= =?UTF-8?q?nges=20=E6=96=B0=E5=A2=9E=20component=20=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/factory.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/factory.tsx b/src/factory.tsx index cc926544e..c67d1bdde 100644 --- a/src/factory.tsx +++ b/src/factory.tsx @@ -379,7 +379,7 @@ const defaultOmitList = [ 'hiddenOn', 'disabled', 'disabledOn', - 'children', + 'component', 'detectField' ]; @@ -504,13 +504,13 @@ class SchemaRenderer extends React.Component { } else if (schema.children) { return React.isValidElement(schema.children) ? schema.children - : React.createElement(schema.children as any, { - ...rest, - $path: $path, - render: this.renderChild - }); - } else if (typeof schema.render === 'function') { - return schema.render({ + : (schema.children as Function)({ + ...rest, + $path: $path, + render: this.renderChild + }); + } else if (typeof schema.component === 'function') { + return React.createElement(schema.children as any, { ...rest, $path: $path, render: this.renderChild