From 89bcede6336adf820f486fb693b4fe0b4d621da0 Mon Sep 17 00:00:00 2001 From: 2betop <2betop.cn@gmail.com> Date: Mon, 6 Jan 2020 15:55:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20onAction=20=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderers/CRUD.tsx | 3 +-- src/renderers/Page.tsx | 5 +---- src/renderers/Table.tsx | 4 +--- src/utils/helper.ts | 3 ++- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/renderers/CRUD.tsx b/src/renderers/CRUD.tsx index 3f782d58..d4e299c9 100644 --- a/src/renderers/CRUD.tsx +++ b/src/renderers/CRUD.tsx @@ -117,8 +117,7 @@ export default class CRUD extends React.Component { 'loadDataOnce', 'loadDataOnceFetchOnFilter', 'source', - 'header', - 'onAction' + 'header' ]; static defaultProps = { toolbarInline: true, diff --git a/src/renderers/Page.tsx b/src/renderers/Page.tsx index 62d801f0..b0982c50 100644 --- a/src/renderers/Page.tsx +++ b/src/renderers/Page.tsx @@ -78,10 +78,7 @@ export default class Page extends React.Component { 'body', 'aside', 'messages', - 'style', - 'onAction', - 'onConfirm', - 'onClose' + 'style' ]; componentWillMount() { diff --git a/src/renderers/Table.tsx b/src/renderers/Table.tsx index 748bc56b..663ec213 100644 --- a/src/renderers/Table.tsx +++ b/src/renderers/Table.tsx @@ -122,9 +122,7 @@ export default class Table extends React.Component { 'combineNum', 'items', 'valueField', - 'saveImmediately', - 'onAction', - 'onQuickChange' + 'saveImmediately' ]; static defaultProps: Partial = { className: '', diff --git a/src/utils/helper.ts b/src/utils/helper.ts index a8129bf3..337d8f84 100644 --- a/src/utils/helper.ts +++ b/src/utils/helper.ts @@ -1098,7 +1098,8 @@ export function chainEvents(props: any, schema: any) { if ( key.substr(0, 2) === 'on' && typeof props[key] === 'function' && - typeof schema[key] === 'function' + typeof schema[key] === 'function' && + schema[key] !== props[key] ) { ret[key] = chainFunctions(schema[key], props[key]); } else {