js: add base64 for placeholder & error in image

This commit is contained in:
王劲鹏 2020-05-11 11:18:30 +08:00 committed by osborn
parent 9759eac38b
commit dabd53a1f5
9 changed files with 51 additions and 1 deletions

View File

@ -1790,6 +1790,10 @@ var Image = /** @class */ (function (_super) {
Property, Property,
__metadata$4("design:type", String) __metadata$4("design:type", String)
], Image.prototype, "placeHolderImage", void 0); ], Image.prototype, "placeHolderImage", void 0);
__decorate$4([
Property,
__metadata$4("design:type", String)
], Image.prototype, "placeHolderImageBase64", void 0);
__decorate$4([ __decorate$4([
Property, Property,
__metadata$4("design:type", Color __metadata$4("design:type", Color
@ -1803,6 +1807,10 @@ var Image = /** @class */ (function (_super) {
Property, Property,
__metadata$4("design:type", String) __metadata$4("design:type", String)
], Image.prototype, "errorImage", void 0); ], Image.prototype, "errorImage", void 0);
__decorate$4([
Property,
__metadata$4("design:type", String)
], Image.prototype, "errorImageBase64", void 0);
__decorate$4([ __decorate$4([
Property, Property,
__metadata$4("design:type", Color) __metadata$4("design:type", Color)

View File

@ -1340,6 +1340,10 @@ __decorate$4([
Property, Property,
__metadata$4("design:type", String) __metadata$4("design:type", String)
], Image.prototype, "placeHolderImage", void 0); ], Image.prototype, "placeHolderImage", void 0);
__decorate$4([
Property,
__metadata$4("design:type", String)
], Image.prototype, "placeHolderImageBase64", void 0);
__decorate$4([ __decorate$4([
Property, Property,
__metadata$4("design:type", Color __metadata$4("design:type", Color
@ -1353,6 +1357,10 @@ __decorate$4([
Property, Property,
__metadata$4("design:type", String) __metadata$4("design:type", String)
], Image.prototype, "errorImage", void 0); ], Image.prototype, "errorImage", void 0);
__decorate$4([
Property,
__metadata$4("design:type", String)
], Image.prototype, "errorImageBase64", void 0);
__decorate$4([ __decorate$4([
Property, Property,
__metadata$4("design:type", Color) __metadata$4("design:type", Color)

View File

@ -2799,6 +2799,10 @@ __decorate$4([
Property, Property,
__metadata$4("design:type", String) __metadata$4("design:type", String)
], Image.prototype, "placeHolderImage", void 0); ], Image.prototype, "placeHolderImage", void 0);
__decorate$4([
Property,
__metadata$4("design:type", String)
], Image.prototype, "placeHolderImageBase64", void 0);
__decorate$4([ __decorate$4([
Property, Property,
__metadata$4("design:type", Color __metadata$4("design:type", Color
@ -2812,6 +2816,10 @@ __decorate$4([
Property, Property,
__metadata$4("design:type", String) __metadata$4("design:type", String)
], Image.prototype, "errorImage", void 0); ], Image.prototype, "errorImage", void 0);
__decorate$4([
Property,
__metadata$4("design:type", String)
], Image.prototype, "errorImageBase64", void 0);
__decorate$4([ __decorate$4([
Property, Property,
__metadata$4("design:type", Color) __metadata$4("design:type", Color)

2
doric-js/index.d.ts vendored
View File

@ -473,6 +473,7 @@ declare module 'doric/lib/src/widget/image' {
* Local file name * Local file name
*/ */
placeHolderImage?: string; placeHolderImage?: string;
placeHolderImageBase64?: string;
/** /**
* Display while image is loading * Display while image is loading
* Color * Color
@ -484,6 +485,7 @@ declare module 'doric/lib/src/widget/image' {
* It can be file name in local path * It can be file name in local path
*/ */
errorImage?: string; errorImage?: string;
errorImageBase64?: string;
/** /**
* Display while image is failed to load * Display while image is failed to load
* Color * Color

View File

@ -27,6 +27,7 @@ export declare class Image extends View {
* Local file name * Local file name
*/ */
placeHolderImage?: string; placeHolderImage?: string;
placeHolderImageBase64?: string;
/** /**
* Display while image is loading * Display while image is loading
* Color * Color
@ -38,6 +39,7 @@ export declare class Image extends View {
* It can be file name in local path * It can be file name in local path
*/ */
errorImage?: string; errorImage?: string;
errorImageBase64?: string;
/** /**
* Display while image is failed to load * Display while image is failed to load
* Color * Color

View File

@ -61,6 +61,10 @@ __decorate([
Property, Property,
__metadata("design:type", String) __metadata("design:type", String)
], Image.prototype, "placeHolderImage", void 0); ], Image.prototype, "placeHolderImage", void 0);
__decorate([
Property,
__metadata("design:type", String)
], Image.prototype, "placeHolderImageBase64", void 0);
__decorate([ __decorate([
Property, Property,
__metadata("design:type", Color __metadata("design:type", Color
@ -74,6 +78,10 @@ __decorate([
Property, Property,
__metadata("design:type", String) __metadata("design:type", String)
], Image.prototype, "errorImage", void 0); ], Image.prototype, "errorImage", void 0);
__decorate([
Property,
__metadata("design:type", String)
], Image.prototype, "errorImageBase64", void 0);
__decorate([ __decorate([
Property, Property,
__metadata("design:type", Color) __metadata("design:type", Color)

View File

@ -57,6 +57,9 @@ export class Image extends View {
*/ */
@Property @Property
placeHolderImage?: string placeHolderImage?: string
@Property
placeHolderImageBase64?: string
/** /**
* Display while image is loading * Display while image is loading
* Color * Color
@ -70,6 +73,9 @@ export class Image extends View {
*/ */
@Property @Property
errorImage?: string errorImage?: string
@Property
errorImageBase64?: string
/** /**
* Display while image is failed to load * Display while image is failed to load
* Color * Color

View File

@ -2857,6 +2857,10 @@ __decorate$4([
Property, Property,
__metadata$4("design:type", String) __metadata$4("design:type", String)
], Image.prototype, "placeHolderImage", void 0); ], Image.prototype, "placeHolderImage", void 0);
__decorate$4([
Property,
__metadata$4("design:type", String)
], Image.prototype, "placeHolderImageBase64", void 0);
__decorate$4([ __decorate$4([
Property, Property,
__metadata$4("design:type", Color __metadata$4("design:type", Color
@ -2870,6 +2874,10 @@ __decorate$4([
Property, Property,
__metadata$4("design:type", String) __metadata$4("design:type", String)
], Image.prototype, "errorImage", void 0); ], Image.prototype, "errorImage", void 0);
__decorate$4([
Property,
__metadata$4("design:type", String)
], Image.prototype, "errorImageBase64", void 0);
__decorate$4([ __decorate$4([
Property, Property,
__metadata$4("design:type", Color) __metadata$4("design:type", Color)

File diff suppressed because one or more lines are too long