interface.d.ts 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import type { CSSProperties, TransitionProps } from 'vue';
  2. import type { VueNode } from '../_util/type';
  3. /** Two char of 't' 'b' 'c' 'l' 'r'. Example: 'lt' */
  4. export declare type AlignPoint = string;
  5. export interface AlignType {
  6. /**
  7. * move point of source node to align with point of target node.
  8. * Such as ['tr','cc'], align top right point of source node with center point of target node.
  9. * Point can be 't'(top), 'b'(bottom), 'c'(center), 'l'(left), 'r'(right) */
  10. points?: AlignPoint[];
  11. /**
  12. * offset source node by offset[0] in x and offset[1] in y.
  13. * If offset contains percentage string value, it is relative to sourceNode region.
  14. */
  15. offset?: number[];
  16. /**
  17. * offset target node by offset[0] in x and offset[1] in y.
  18. * If targetOffset contains percentage string value, it is relative to targetNode region.
  19. */
  20. targetOffset?: number[];
  21. /**
  22. * If adjustX field is true, will adjust source node in x direction if source node is invisible.
  23. * If adjustY field is true, will adjust source node in y direction if source node is invisible.
  24. */
  25. overflow?: {
  26. adjustX?: boolean | number;
  27. adjustY?: boolean | number;
  28. };
  29. /**
  30. * Whether use css right instead of left to position
  31. */
  32. useCssRight?: boolean;
  33. /**
  34. * Whether use css bottom instead of top to position
  35. */
  36. useCssBottom?: boolean;
  37. /**
  38. * Whether use css transform instead of left/top/right/bottom to position if browser supports.
  39. * Defaults to false.
  40. */
  41. useCssTransform?: boolean;
  42. ignoreShake?: boolean;
  43. }
  44. export declare type BuildInPlacements = Record<string, AlignType>;
  45. export declare type StretchType = string;
  46. export declare type ActionType = string;
  47. export declare type AnimationType = string;
  48. export declare type TransitionNameType = string;
  49. export interface Point {
  50. pageX: number;
  51. pageY: number;
  52. }
  53. export interface CommonEventHandler {
  54. remove: () => void;
  55. }
  56. export interface MobileConfig {
  57. /** Set popup motion. You can ref `rc-motion` for more info. */
  58. popupMotion?: TransitionProps;
  59. popupClassName?: string;
  60. popupStyle?: CSSProperties;
  61. popupRender?: (originNode: VueNode) => VueNode;
  62. }