image-viewer.d.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. import { SuperComponent } from '../common/src/index';
  2. export default class ImageViewer extends SuperComponent {
  3. externalClasses: string[];
  4. properties: {
  5. backgroundColor?: {
  6. type: StringConstructor;
  7. value?: string;
  8. };
  9. closeBtn?: {
  10. type: null;
  11. value?: string | boolean | object;
  12. };
  13. deleteBtn?: {
  14. type: null;
  15. value?: string | boolean | object;
  16. };
  17. images?: {
  18. type: ArrayConstructor;
  19. value?: string[];
  20. };
  21. initialIndex?: {
  22. type: NumberConstructor;
  23. value?: Number;
  24. };
  25. lazy?: {
  26. type: BooleanConstructor;
  27. value?: boolean;
  28. };
  29. showIndex?: {
  30. type: BooleanConstructor;
  31. value?: boolean;
  32. };
  33. usingCustomNavbar?: {
  34. type: BooleanConstructor;
  35. value?: boolean;
  36. };
  37. visible?: {
  38. type: BooleanConstructor;
  39. value?: boolean;
  40. };
  41. defaultVisible?: {
  42. type: BooleanConstructor;
  43. value?: boolean;
  44. };
  45. };
  46. data: {
  47. prefix: string;
  48. classPrefix: string;
  49. currentSwiperIndex: number;
  50. loadedImageIndexes: any[];
  51. windowHeight: number;
  52. windowWidth: number;
  53. swiperStyle: {};
  54. imagesStyle: {};
  55. maskTop: number;
  56. };
  57. options: {
  58. multipleSlots: boolean;
  59. };
  60. controlledProps: {
  61. key: string;
  62. event: string;
  63. }[];
  64. ready(): void;
  65. observers: {
  66. 'visible,initialIndex,images'(visible: any, initialIndex: any, images: any): void;
  67. closeBtn(v: any): void;
  68. deleteBtn(v: any): void;
  69. };
  70. methods: {
  71. calcMaskTop(): void;
  72. saveScreenSize(): void;
  73. calcImageDisplayStyle(imageWidth: any, imageHeight: any): {
  74. styleObj: {
  75. width: string;
  76. height: string;
  77. left: string;
  78. transform: string;
  79. };
  80. } | {
  81. styleObj: {
  82. width: string;
  83. height: string;
  84. left?: undefined;
  85. transform?: undefined;
  86. };
  87. };
  88. onImageLoadSuccess(e: WechatMiniprogram.TouchEvent): void;
  89. onSwiperChange(e: WechatMiniprogram.TouchEvent): void;
  90. onClose(e: any): void;
  91. onDelete(): void;
  92. };
  93. }