props.d.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import { IBaseProps } from '../_util/base';
  2. interface IStep {
  3. /**
  4. * @description 图片地址
  5. */
  6. imageUrl: string;
  7. /**
  8. * @description 图片模式
  9. */
  10. imageMode: string;
  11. /**
  12. * @description 图片内联样式
  13. */
  14. imageStyle: string;
  15. /**
  16. * @description 距离顶部
  17. */
  18. top: string;
  19. /**
  20. * @description 距离左边
  21. */
  22. left: string;
  23. /**
  24. * @description className
  25. */
  26. className?: string;
  27. }
  28. export interface IGuideTour extends IBaseProps {
  29. /**
  30. * @description 蒙层样式
  31. */
  32. maskStyle: string;
  33. /**
  34. * @description 蒙层 className
  35. */
  36. maskClassName?: string;
  37. /**
  38. * @description 步骤详情
  39. */
  40. items: IStep[];
  41. /**
  42. * @description 当前步骤
  43. */
  44. current: number;
  45. /**
  46. * @description 初始step
  47. */
  48. defaultCurrent: number;
  49. /**
  50. * @description 是否开启滑动模式
  51. */
  52. swiperable: boolean;
  53. /**
  54. * @description 引导是否可见, 受控
  55. * @default true
  56. */
  57. visible: boolean;
  58. /**
  59. * @description 关闭回调
  60. */
  61. onCancel: () => void;
  62. /**
  63. * @description 步骤改变回调
  64. */
  65. onChange: (index: number) => boolean;
  66. }
  67. export declare const GuideTourDefaultProps: Partial<IGuideTour>;
  68. export declare const GuideTourFunctionalProps: Partial<IGuideTour>;
  69. export {};