@tarojs/components
Version:
22 lines (21 loc) • 804 B
TypeScript
import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
export type Mode = 'scaleToFill' | 'aspectFit' | 'aspectFill' | 'widthFix' | 'heightFix' | 'top' | 'bottom' | 'center' | 'left' | 'right' | 'top left' | 'top right' | 'bottom left' | 'bottom right';
export declare class Image implements ComponentInterface {
src: string;
mode: Mode;
lazyLoad: boolean;
nativeProps: {};
/**
* H5 / WebComponents 为 true 时关闭默认占位,外层容器宽高均为 `auto`(默认 false 仍为小程序对齐的 320×240)。
* @default false
*/
disableDefaultSize: boolean;
didLoad: boolean;
onLoad: EventEmitter;
onError: EventEmitter;
private imgRef;
componentDidLoad(): void;
imageOnLoad(): void;
imageOnError(e: Event): void;
render(): any;
}