mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:48:55 +08:00
Merge pull request #8008 from duian/refactor/ActionProps
refactor: 提取各个 ActionSchema 的公共Key
This commit is contained in:
commit
a0b616f584
@ -483,93 +483,29 @@ export const createSyntheticEvent = <T extends Element, E extends Event>(
|
||||
};
|
||||
};
|
||||
|
||||
type CommonKeys =
|
||||
| 'type'
|
||||
| 'className'
|
||||
| 'iconClassName'
|
||||
| 'rightIconClassName'
|
||||
| 'loadingClassName';
|
||||
|
||||
export interface ActionProps
|
||||
extends Omit<
|
||||
ButtonSchema,
|
||||
'className' | 'iconClassName' | 'rightIconClassName' | 'loadingClassName'
|
||||
>,
|
||||
ThemeProps,
|
||||
Omit<
|
||||
AjaxActionSchema,
|
||||
| 'type'
|
||||
| 'className'
|
||||
| 'iconClassName'
|
||||
| 'rightIconClassName'
|
||||
| 'loadingClassName'
|
||||
>,
|
||||
Omit<
|
||||
UrlActionSchema,
|
||||
| 'type'
|
||||
| 'className'
|
||||
| 'iconClassName'
|
||||
| 'rightIconClassName'
|
||||
| 'loadingClassName'
|
||||
>,
|
||||
Omit<
|
||||
LinkActionSchema,
|
||||
| 'type'
|
||||
| 'className'
|
||||
| 'iconClassName'
|
||||
| 'rightIconClassName'
|
||||
| 'loadingClassName'
|
||||
>,
|
||||
Omit<
|
||||
DialogActionSchema,
|
||||
| 'type'
|
||||
| 'className'
|
||||
| 'iconClassName'
|
||||
| 'rightIconClassName'
|
||||
| 'loadingClassName'
|
||||
>,
|
||||
Omit<
|
||||
DrawerActionSchema,
|
||||
| 'type'
|
||||
| 'className'
|
||||
| 'iconClassName'
|
||||
| 'rightIconClassName'
|
||||
| 'loadingClassName'
|
||||
>,
|
||||
Omit<
|
||||
ToastSchemaBase,
|
||||
| 'type'
|
||||
| 'className'
|
||||
| 'iconClassName'
|
||||
| 'rightIconClassName'
|
||||
| 'loadingClassName'
|
||||
>,
|
||||
Omit<
|
||||
CopyActionSchema,
|
||||
| 'type'
|
||||
| 'className'
|
||||
| 'iconClassName'
|
||||
| 'rightIconClassName'
|
||||
| 'loadingClassName'
|
||||
>,
|
||||
Omit<
|
||||
ReloadActionSchema,
|
||||
| 'type'
|
||||
| 'className'
|
||||
| 'iconClassName'
|
||||
| 'rightIconClassName'
|
||||
| 'loadingClassName'
|
||||
>,
|
||||
Omit<
|
||||
EmailActionSchema,
|
||||
| 'type'
|
||||
| 'className'
|
||||
| 'iconClassName'
|
||||
| 'rightIconClassName'
|
||||
| 'loadingClassName'
|
||||
| 'body'
|
||||
>,
|
||||
Omit<
|
||||
OtherActionSchema,
|
||||
| 'type'
|
||||
| 'className'
|
||||
| 'iconClassName'
|
||||
| 'rightIconClassName'
|
||||
| 'loadingClassName'
|
||||
>,
|
||||
Omit<AjaxActionSchema, CommonKeys>,
|
||||
Omit<UrlActionSchema, CommonKeys>,
|
||||
Omit<LinkActionSchema, CommonKeys>,
|
||||
Omit<DialogActionSchema, CommonKeys>,
|
||||
Omit<DrawerActionSchema, CommonKeys>,
|
||||
Omit<ToastSchemaBase, CommonKeys>,
|
||||
Omit<CopyActionSchema, CommonKeys>,
|
||||
Omit<ReloadActionSchema, CommonKeys>,
|
||||
Omit<EmailActionSchema, CommonKeys | 'body'>,
|
||||
Omit<OtherActionSchema, CommonKeys>,
|
||||
SpinnerExtraProps {
|
||||
actionType: any;
|
||||
onAction?: (
|
||||
|
Loading…
Reference in New Issue
Block a user