image-viewer.d.ts 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. optionalTypes: NumberConstructor[];
  8. value?: string | number;
  9. };
  10. images?: {
  11. type: ArrayConstructor;
  12. value?: string[];
  13. };
  14. initialIndex?: {
  15. type: NumberConstructor;
  16. value?: number;
  17. };
  18. showIndex?: {
  19. type: BooleanConstructor;
  20. value?: boolean;
  21. };
  22. deleteBtn?: {
  23. type: BooleanConstructor;
  24. value: false;
  25. };
  26. closeBtn?: {
  27. type: BooleanConstructor;
  28. value: false;
  29. };
  30. visible?: {
  31. type: BooleanConstructor;
  32. value?: boolean;
  33. };
  34. defaultVisible?: {
  35. type: BooleanConstructor;
  36. value?: boolean;
  37. };
  38. };
  39. data: {
  40. prefix: string;
  41. classPrefix: string;
  42. currentSwiperIndex: number;
  43. windowHeight: number;
  44. windowWidth: number;
  45. imagesShape: {};
  46. };
  47. options: {
  48. multipleSlots: boolean;
  49. };
  50. controlledProps: {
  51. key: string;
  52. event: string;
  53. }[];
  54. ready(): void;
  55. observers: {
  56. visible(value: any): void;
  57. };
  58. methods: {
  59. saveScreenSize(): void;
  60. calcImageDisplayStyle(imageWidth: any, imageHeight: any): {
  61. styleObj: {
  62. width: string;
  63. height: string;
  64. left: string;
  65. transform: string;
  66. };
  67. } | {
  68. styleObj: {
  69. width: string;
  70. height: string;
  71. left?: undefined;
  72. transform?: undefined;
  73. };
  74. };
  75. onImageLoadSuccess(e: WechatMiniprogram.TouchEvent): void;
  76. onSwiperChange(e: WechatMiniprogram.TouchEvent): void;
  77. onClose(e: WechatMiniprogram.TouchEvent): void;
  78. onDelete(): void;
  79. };
  80. }