image-viewer.d.ts 2.2 KB

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