tsp-component
Version:
提供多端和react版本的UI组件
42 lines (40 loc) • 756 B
TypeScript
interface TspComponentImgViewProps {
className?: string;
id?: string;
/**
* 图片地址
*/
src: string;
/**
* 加载中的图片地址
*/
loading: string;
/**
* 加载失败的图片地址
*/
fail: string;
/**
* 超时时的图片地址
*/
timeout?: string;
/**
* 点击事件
*/
onClick?: Function;
/**
* 默认图片地址
*/
default?: string;
/**
* 状态改变后回调
*/
onStatusChange?: (status: TspComponentImgViewStatus) => void;
/**
* 图片描述,用于上报异常时收集信息
*/
describe?: {
api: string;
data: object;
}
}
type TspComponentImgViewStatus = 'loading' | 'complete' | 'fail' | 'timeout';