This commit is contained in:
Taric Xin
2022-04-20 17:14:28 +08:00
parent 8b262bd028
commit c432f38bea
4 changed files with 53 additions and 4 deletions

View File

@ -10,6 +10,9 @@
*/
import { Component, OnInit, EventEmitter, Input, Output } from '@angular/core';
import { BaseService } from '@shared';
import { NzImageService } from 'ng-zorro-antd/image';
import { NzUploadFile } from 'ng-zorro-antd/upload';
import { of } from 'rxjs';
const JSONTYPE = new Set([5, 6, 9, 999]);
@Component({
@ -37,7 +40,7 @@ export class DynamicSettingH5Component implements OnInit {
@Input()
itemValue = 'itemValue';
listUrls: any;
constructor(public service: BaseService) {}
constructor(public service: BaseService, private nzImageService: NzImageService) {}
ngOnInit() {}
@ -84,5 +87,17 @@ export class DynamicSettingH5Component implements OnInit {
});
this.saveEvent.emit(params);
}
uploadChange(info: { file: NzUploadFile; type?: string }, item: any): void {
switch (info.type) {
case 'success':
item.itemValue = info.file.response.data.fullFilePath;
break;
}
}
showImg(url: any) {
this.nzImageService.preview([{ src: url }]);
}
}
// [0]?.response?.data.fullFilePath