@orca-fe/pocket
Version:
UI components by orca-team
20 lines (19 loc) • 881 B
TypeScript
import React from 'react';
export interface EqRatioImgProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onLoad' | 'onError'>, Pick<React.HTMLAttributes<HTMLImageElement>, 'onLoad' | 'onError'> {
/** 图片 ref */
imgRef?: ((instance: HTMLImageElement) => void) | React.MutableRefObject<HTMLImageElement>;
/** 图片链接 */
src?: string;
/** 受控状态 */
status?: 'loading' | 'failed' | 'loaded';
/** loading的图片地址 */
loadingSrc?: string | React.ReactElement;
/** 异常的图片地址 */
errSrc?: string | React.ReactElement;
/** 拉伸模式 */
mode?: 'normal' | 'scale' | 'cover' | 'contain' | string;
/** 图片的位置排布(backgroundPosition) */
imgPosition?: string;
}
declare const EqRatioImg: (props: EqRatioImgProps) => import("react/jsx-runtime").JSX.Element;
export default EqRatioImg;