feat:add imagepath and imageRes for Image
This commit is contained in:
@@ -1667,7 +1667,11 @@ var Image = /** @class */ (function (_super) {
|
||||
__decorate$4([
|
||||
Property,
|
||||
__metadata$4("design:type", String)
|
||||
], Image.prototype, "imageBase64", void 0);
|
||||
], Image.prototype, "imagePath", void 0);
|
||||
__decorate$4([
|
||||
Property,
|
||||
__metadata$4("design:type", String)
|
||||
], Image.prototype, "imageRes", void 0);
|
||||
__decorate$4([
|
||||
Property,
|
||||
__metadata$4("design:type", Number)
|
||||
|
@@ -1233,7 +1233,11 @@ __decorate$4([
|
||||
__decorate$4([
|
||||
Property,
|
||||
__metadata$4("design:type", String)
|
||||
], Image.prototype, "imageBase64", void 0);
|
||||
], Image.prototype, "imagePath", void 0);
|
||||
__decorate$4([
|
||||
Property,
|
||||
__metadata$4("design:type", String)
|
||||
], Image.prototype, "imageRes", void 0);
|
||||
__decorate$4([
|
||||
Property,
|
||||
__metadata$4("design:type", Number)
|
||||
|
@@ -2692,7 +2692,11 @@ __decorate$4([
|
||||
__decorate$4([
|
||||
Property,
|
||||
__metadata$4("design:type", String)
|
||||
], Image.prototype, "imageBase64", void 0);
|
||||
], Image.prototype, "imagePath", void 0);
|
||||
__decorate$4([
|
||||
Property,
|
||||
__metadata$4("design:type", String)
|
||||
], Image.prototype, "imageRes", void 0);
|
||||
__decorate$4([
|
||||
Property,
|
||||
__metadata$4("design:type", Number)
|
||||
|
15
doric-js/index.d.ts
vendored
15
doric-js/index.d.ts
vendored
@@ -483,6 +483,18 @@ declare module 'doric/lib/src/widget/image' {
|
||||
}
|
||||
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;
|
||||
@@ -497,7 +509,8 @@ declare module 'doric/lib/src/widget/image' {
|
||||
}
|
||||
export class Image extends View implements IImage {
|
||||
imageUrl?: string;
|
||||
imageBase64?: string;
|
||||
imagePath?: string;
|
||||
imageRes?: string;
|
||||
scaleType?: ScaleType;
|
||||
isBlur?: boolean;
|
||||
/**
|
||||
|
15
doric-js/lib/src/widget/image.d.ts
vendored
15
doric-js/lib/src/widget/image.d.ts
vendored
@@ -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;
|
||||
/**
|
||||
|
@@ -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)
|
||||
|
@@ -25,6 +25,20 @@ export 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
|
||||
@@ -40,7 +54,10 @@ export class Image extends View implements IImage {
|
||||
imageUrl?: string
|
||||
|
||||
@Property
|
||||
imageBase64?: string
|
||||
imagePath?: string
|
||||
|
||||
@Property
|
||||
imageRes?: string
|
||||
|
||||
@Property
|
||||
scaleType?: ScaleType
|
||||
|
Reference in New Issue
Block a user