No Description

index.d.ts 855B

12345678910111213141516171819202122232425262728293031
  1. /// <reference types="react" />
  2. import React from "react";
  3. interface ModalProps {
  4. visible: boolean;
  5. onCancel: (e: any) => void;
  6. container?: HTMLElement;
  7. }
  8. declare class Modal extends React.PureComponent<ModalProps> {
  9. static hasShowWarning: boolean;
  10. render(): false | React.ReactPortal | null;
  11. }
  12. interface ModalCMDOptions {
  13. children: any;
  14. container?: HTMLElement;
  15. options?: {
  16. mask?: true;
  17. };
  18. }
  19. interface ModalCMDRecord {
  20. modalInstance: HTMLElement;
  21. }
  22. declare class ModalCMD {
  23. static currentModal: ModalCMDRecord[];
  24. constructor();
  25. private static recordModal;
  26. private static delModal;
  27. static show({ children, container }: ModalCMDOptions): void;
  28. static hide(targetId?: string | number): void;
  29. }
  30. export { Modal as default, Modal, ModalProps, ModalCMDOptions, ModalCMDRecord, ModalCMD };