edit
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user