image-viewer.d.ts 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. imagesShape: {};
  50. };
  51. options: {
  52. multipleSlots: boolean;
  53. };
  54. controlledProps: {
  55. key: string;
  56. event: string;
  57. }[];
  58. ready(): void;
  59. observers: {
  60. visible(value: any): void;
  61. closeBtn(v: any): void;
  62. deleteBtn(v: any): void;
  63. };
  64. methods: {
  65. saveScreenSize(): void;
  66. calcImageDisplayStyle(imageWidth: any, imageHeight: any): {
  67. styleObj: {
  68. width: string;
  69. height: string;
  70. left: string;
  71. transform: string;
  72. };
  73. } | {
  74. styleObj: {
  75. width: string;
  76. height: string;
  77. left?: undefined;
  78. transform?: undefined;
  79. };
  80. };
  81. onImageLoadSuccess(e: WechatMiniprogram.TouchEvent): void;
  82. onSwiperChange(e: WechatMiniprogram.TouchEvent): void;
  83. onClose(e: any): void;
  84. onDelete(): void;
  85. };
  86. }