1
import * as React from 'react';
2 4
import { createHostComponent } from '@remax/shared';
3
import { BaseProps, GenericEvent } from '../../types/component';
4

5
export interface CoverImageProps extends BaseProps {
6
  /** 图标路径,支持临时路径、网络地址(1.6.0起支持)、云文件ID(2.2.3起支持)。暂不支持base64格式。 1.4.0  */
7
  src?: string;
8
  /** 图片加载成功时触发 2.1.0  */
9
  onLoad?: (event: GenericEvent) => any;
10
  /** 图片加载失败时触发 2.1.0  */
11
  onError?: (event: GenericEvent) => any;
12
}
13

14
/**
15
 * @see https://developers.weixin.qq.com/miniprogram/dev/component/cover-image.html
16
 */
17 4
export const CoverImage: React.ComponentType<CoverImageProps> = createHostComponent<CoverImageProps>('cover-image');

Read our documentation on viewing source code .

Loading