修复 onAction 报错问题

This commit is contained in:
2betop 2020-01-06 15:55:29 +08:00
parent 842ecd8387
commit 89bcede633
4 changed files with 5 additions and 10 deletions

View File

@ -117,8 +117,7 @@ export default class CRUD extends React.Component<CRUDProps, any> {
'loadDataOnce', 'loadDataOnce',
'loadDataOnceFetchOnFilter', 'loadDataOnceFetchOnFilter',
'source', 'source',
'header', 'header'
'onAction'
]; ];
static defaultProps = { static defaultProps = {
toolbarInline: true, toolbarInline: true,

View File

@ -78,10 +78,7 @@ export default class Page extends React.Component<PageProps> {
'body', 'body',
'aside', 'aside',
'messages', 'messages',
'style', 'style'
'onAction',
'onConfirm',
'onClose'
]; ];
componentWillMount() { componentWillMount() {

View File

@ -122,9 +122,7 @@ export default class Table extends React.Component<TableProps, object> {
'combineNum', 'combineNum',
'items', 'items',
'valueField', 'valueField',
'saveImmediately', 'saveImmediately'
'onAction',
'onQuickChange'
]; ];
static defaultProps: Partial<TableProps> = { static defaultProps: Partial<TableProps> = {
className: '', className: '',

View File

@ -1098,7 +1098,8 @@ export function chainEvents(props: any, schema: any) {
if ( if (
key.substr(0, 2) === 'on' && key.substr(0, 2) === 'on' &&
typeof props[key] === 'function' && typeof props[key] === 'function' &&
typeof schema[key] === 'function' typeof schema[key] === 'function' &&
schema[key] !== props[key]
) { ) {
ret[key] = chainFunctions(schema[key], props[key]); ret[key] = chainFunctions(schema[key], props[key]);
} else { } else {