props.d.ts 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import { IBaseProps } from '../_util/base';
  2. /**
  3. * @description 弹窗,可在其中加入具体内容,展示更多信息供用户使用。
  4. */
  5. export interface IPopupProps extends IBaseProps {
  6. /**
  7. * @description 是否显示
  8. * @default false
  9. */
  10. visible: boolean;
  11. /**
  12. * @description 是否关闭后销毁内部元素
  13. * @default false
  14. */
  15. destroyOnClose: boolean;
  16. /**
  17. * @description 是否展示蒙层
  18. * @default true
  19. */
  20. showMask: boolean;
  21. /**
  22. * @description 关闭时回调
  23. */
  24. onClose: () => void;
  25. /**
  26. * @description 弹窗布局
  27. * @default "center"
  28. */
  29. position: 'center' | 'top' | 'bottom' | 'left' | 'right';
  30. /**
  31. * @desciption 是否开启过渡动画
  32. */
  33. animation: boolean;
  34. /**
  35. * @desciption 动画类型
  36. * @default "transform"
  37. */
  38. animationType: 'transform' | 'position';
  39. /**
  40. * @description 过渡动画时长,单位毫秒
  41. */
  42. duration: number;
  43. /**
  44. * @description 内容区高度,单位px
  45. */
  46. height: number;
  47. /**
  48. * @description 内容区宽度,单位px
  49. */
  50. width: number;
  51. /**
  52. * @description 遮罩层类名
  53. */
  54. maskClassName: string;
  55. /**
  56. * @description 遮罩层样式
  57. */
  58. maskStyle: string;
  59. zIndex: number;
  60. }
  61. export declare const PopupDefaultProps: Partial<IPopupProps>;