fix ui issues and upload image for guild good
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
export interface onSelectArgs {
|
||||
export interface onSelectFileArgs {
|
||||
data: FormData;
|
||||
file: File;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Maybe } from '@/core';
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { FileSelectEvent, FileUpload } from 'primeng/fileupload';
|
||||
import { onSelectArgs } from './model';
|
||||
import { onSelectFileArgs } from './model';
|
||||
|
||||
@Component({
|
||||
selector: 'app-shared-upload-file',
|
||||
@@ -13,11 +13,11 @@ export class SharedUploadFileComponent {
|
||||
@Input() loading: boolean = false;
|
||||
@Input() name: string = 'file';
|
||||
@Input() accept: string = 'image/*';
|
||||
@Input() maxSize: Maybe<number> = 5 * 1024;
|
||||
@Input() maxSize: Maybe<number> = 5 * 1024 * 1024;
|
||||
@Input() error: Maybe<string> = null;
|
||||
@Input() hint: Maybe<string> = null;
|
||||
|
||||
@Output() onSelect = new EventEmitter<onSelectArgs>();
|
||||
@Output() onSelect = new EventEmitter<onSelectFileArgs>();
|
||||
|
||||
onSelectedFile($event: FileSelectEvent) {
|
||||
const file = $event.files?.[0];
|
||||
|
||||
Reference in New Issue
Block a user