修复 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',
'loadDataOnceFetchOnFilter',
'source',
'header',
'onAction'
'header'
];
static defaultProps = {
toolbarInline: true,

View File

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

View File

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

View File

@ -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 {