props.d.ts 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. import { IBaseProps } from '../_util/base';
  2. /**
  3. * @description 对话框,当应用中需要比较明显的对用户当前的操作行为进行警示或提醒时,可以使用对话框。用户需要针对对话框进行操作后方可结束。
  4. */
  5. export interface IModalProps extends IBaseProps {
  6. /**
  7. * @description Modal body类名
  8. */
  9. bodyClassName: string;
  10. /**
  11. * @description Modal body样式
  12. */
  13. bodyStyle: string;
  14. /**
  15. * @description 遮罩层类名
  16. */
  17. maskClassName: string;
  18. /**
  19. * @description 遮罩层样式
  20. */
  21. maskStyle: string;
  22. /**
  23. * @description 是否可点击蒙层关闭
  24. * @default true
  25. */
  26. maskClosable: boolean;
  27. /**
  28. * @description 类型
  29. */
  30. type: 'default' | 'focus';
  31. /**
  32. * @description 是否显示右上角的关闭按钮。只有在 type 为 focus 生效
  33. */
  34. closable: boolean;
  35. /**
  36. * @description 过渡动画时长,单位毫秒
  37. */
  38. duration: number;
  39. /**
  40. * @description 标题
  41. */
  42. title: string;
  43. /**
  44. * @description 内容
  45. */
  46. content: string;
  47. /**
  48. * @description 是否可见,受控模式
  49. * @default false
  50. */
  51. visible: boolean;
  52. /**
  53. * @description 是否关闭后销毁内部元素
  54. * @default false
  55. */
  56. destroyOnClose?: boolean;
  57. /**
  58. * @description 主按钮文本
  59. */
  60. primaryButtonText: string;
  61. /**
  62. * @description 辅助按钮文本
  63. */
  64. secondaryButtonText: string;
  65. /**
  66. * @description 取消按钮文案
  67. */
  68. cancelButtonText: string;
  69. /**
  70. * @description 主按钮样式
  71. */
  72. primaryButtonStyle: string;
  73. /**
  74. * @description 辅助按钮样式
  75. */
  76. secondaryButtonStyle: string;
  77. /**
  78. * @description 取消按钮样式
  79. */
  80. cancelButtonStyle: string;
  81. /**
  82. * @description 触发关闭时回调
  83. */
  84. onClose: () => void;
  85. /**
  86. * @description 主按钮点击事件
  87. */
  88. onPrimaryButtonTap: () => void;
  89. /**
  90. * @description 次要按钮点击事件
  91. */
  92. onSecondaryButtonTap: () => void;
  93. /**
  94. * @description 取消按钮点击事件
  95. */
  96. onCancelButtonTap: () => void;
  97. }
  98. export declare const ModalDefaultProps: Partial<IModalProps>;