feat:add imagepath and imageRes for Image

This commit is contained in:
pengfei.zhou
2020-03-12 19:56:47 +08:00
committed by osborn
parent 7b371ca58b
commit a6df529f8f
9 changed files with 172 additions and 58 deletions

View File

@@ -7,6 +7,18 @@ export declare enum ScaleType {
}
export interface IImage extends IView {
imageUrl?: string;
/**
* Read image from local path
* For android,it based on assets dir.
* For iOS,it based on main bundle dir.
*/
imagePath?: string;
/**
* Read image from resource
* For android,it will try to read from drawable.
* For iOS,it will try to read from Image.Assets.
*/
imageRes?: string;
imageBase64?: string;
scaleType?: ScaleType;
isBlur?: boolean;
@@ -21,7 +33,8 @@ export interface IImage extends IView {
}
export declare class Image extends View implements IImage {
imageUrl?: string;
imageBase64?: string;
imagePath?: string;
imageRes?: string;
scaleType?: ScaleType;
isBlur?: boolean;
/**

View File

@@ -40,7 +40,11 @@ __decorate([
__decorate([
Property,
__metadata("design:type", String)
], Image.prototype, "imageBase64", void 0);
], Image.prototype, "imagePath", void 0);
__decorate([
Property,
__metadata("design:type", String)
], Image.prototype, "imageRes", void 0);
__decorate([
Property,
__metadata("design:type", Number)