image-viewer.d.ts 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. showIndex?: {
  26. type: BooleanConstructor;
  27. value?: boolean;
  28. };
  29. usingCustomNavbar?: {
  30. type: BooleanConstructor;
  31. value?: boolean;
  32. };
  33. visible?: {
  34. type: BooleanConstructor;
  35. value?: boolean;
  36. };
  37. defaultVisible?: {
  38. type: BooleanConstructor;
  39. value?: boolean;
  40. };
  41. };
  42. data: {
  43. prefix: string;
  44. classPrefix: string;
  45. currentSwiperIndex: number;
  46. windowHeight: number;
  47. windowWidth: number;
  48. swiperStyle: {};
  49. imagesStyle: {};
  50. maskTop: number;
  51. };
  52. options: {
  53. multipleSlots: boolean;
  54. };
  55. controlledProps: {
  56. key: string;
  57. event: string;
  58. }[];
  59. ready(): void;
  60. observers: {
  61. 'visible,initialIndex,images'(visible: any, initialIndex: any, images: any): void;
  62. closeBtn(v: any): void;
  63. deleteBtn(v: any): void;
  64. };
  65. methods: {
  66. calcMaskTop(): void;
  67. saveScreenSize(): void;
  68. calcImageDisplayStyle(imageWidth: any, imageHeight: any): {
  69. styleObj: {
  70. width: string;
  71. height: string;
  72. left: string;
  73. transform: string;
  74. };
  75. } | {
  76. styleObj: {
  77. width: string;
  78. height: string;
  79. left?: undefined;
  80. transform?: undefined;
  81. };
  82. };
  83. onImageLoadSuccess(e: WechatMiniprogram.TouchEvent): void;
  84. onSwiperChange(e: WechatMiniprogram.TouchEvent): void;
  85. onClose(e: any): void;
  86. onDelete(): void;
  87. };
  88. }