forked from vueComponent/ant-design-vue
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathIDialogPropTypes.ts
48 lines (47 loc) · 1.96 KB
/
IDialogPropTypes.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import type { CSSProperties, ExtractPropTypes, PropType } from 'vue';
import PropTypes from '../_util/vue-types';
export function dialogPropTypes() {
return {
keyboard: { type: Boolean, default: undefined },
mask: { type: Boolean, default: undefined },
afterClose: Function,
closable: { type: Boolean, default: undefined },
maskClosable: { type: Boolean, default: undefined },
visible: { type: Boolean, default: undefined },
destroyOnClose: { type: Boolean, default: undefined },
mousePosition: PropTypes.shape({
x: Number,
y: Number,
}).loose,
title: PropTypes.any,
footer: PropTypes.any,
transitionName: String,
maskTransitionName: String,
animation: PropTypes.any,
maskAnimation: PropTypes.any,
wrapStyle: { type: Object as PropType<CSSProperties>, default: undefined as CSSProperties },
bodyStyle: { type: Object as PropType<CSSProperties>, default: undefined as CSSProperties },
maskStyle: { type: Object as PropType<CSSProperties>, default: undefined as CSSProperties },
prefixCls: String,
wrapClassName: String,
width: [String, Number],
height: [String, Number],
zIndex: Number,
bodyProps: PropTypes.any,
maskProps: PropTypes.any,
wrapProps: PropTypes.any,
getContainer: PropTypes.any,
dialogStyle: { type: Object as PropType<CSSProperties>, default: undefined as CSSProperties },
dialogClass: String,
closeIcon: PropTypes.any,
forceRender: { type: Boolean, default: undefined },
getOpenCount: Function as PropType<() => number>,
// https://github.com/ant-design/ant-design/issues/19771
// https://github.com/react-component/dialog/issues/95
focusTriggerAfterClose: { type: Boolean, default: undefined },
onClose: Function as PropType<(e: MouseEvent | KeyboardEvent) => void>,
modalRender: Function,
};
}
export type IDialogChildProps = Partial<ExtractPropTypes<ReturnType<typeof dialogPropTypes>>>;
export default dialogPropTypes;