swiper.d.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import { SuperComponent, ControlInstance, RelationsOptions } from '../common/src/index';
  2. interface SwitchOpt {
  3. cycle?: boolean;
  4. source: 'autoplay' | 'touch' | 'nav';
  5. }
  6. export default class Swiper extends SuperComponent {
  7. externalClasses: string[];
  8. options: {
  9. multipleSlots: boolean;
  10. };
  11. properties: import("./type").TdSwiperProps;
  12. observers: {
  13. navigation(val: any): void;
  14. current(val: any): void;
  15. autoplay(val: any): void;
  16. interval(val: any): void;
  17. direction(val: any): void;
  18. };
  19. children: any;
  20. $nav: any;
  21. timer: any;
  22. updateTimer: any;
  23. control: ControlInstance;
  24. relations: RelationsOptions;
  25. data: {
  26. _current: number;
  27. _navigation: any;
  28. _width: number;
  29. _height: number;
  30. offsetX: number;
  31. offsetY: number;
  32. total: number;
  33. easings: {
  34. linear: string;
  35. easeInCubic: string;
  36. easeOutCubic: string;
  37. easeInOutCubic: string;
  38. };
  39. inited: boolean;
  40. currentInited: boolean;
  41. prefix: string;
  42. classPrefix: string;
  43. };
  44. attached(): void;
  45. detached(): void;
  46. ready(): void;
  47. initItem(): void;
  48. initNav(): void;
  49. inited(): void;
  50. initCurrent(): void;
  51. play(): void;
  52. replay(): void;
  53. pause(): void;
  54. goto(index: number, source: string): void;
  55. update(index: number, finish?: any): void;
  56. updateNav(index: any): void;
  57. calcOffset(index: number): {
  58. offsetX: number;
  59. offsetY?: undefined;
  60. } | {
  61. offsetY: number;
  62. offsetX?: undefined;
  63. };
  64. next(opt: SwitchOpt): void;
  65. prev(opt: SwitchOpt): void;
  66. onSwiperNavBtnChange(e: any): void;
  67. }
  68. export {};