chore: eslint 配置
This commit is contained in:
@ -6,15 +6,15 @@ interface FileExt extends File {
|
||||
}
|
||||
|
||||
interface FileUploadInst extends FileUploadState {
|
||||
chooseDisabled?: boolean;
|
||||
files: FileExt[];
|
||||
uploadedFiles: {
|
||||
rawFile: FileExt;
|
||||
name: string;
|
||||
url: string;
|
||||
status: 'uploading' | 'uploaded' | 'failed';
|
||||
progress: number;
|
||||
rawFile: FileExt;
|
||||
status: 'failed' | 'uploaded' | 'uploading';
|
||||
url: string;
|
||||
}[];
|
||||
chooseDisabled?: boolean;
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -30,11 +30,11 @@ const onUploader = (event: FileUploadUploaderEvent) => {
|
||||
const files = event.files as FileExt[];
|
||||
for (const file of files) {
|
||||
fileUploadRef.value!.uploadedFiles.push({
|
||||
rawFile: file,
|
||||
name: file.name,
|
||||
url: '',
|
||||
status: 'uploading',
|
||||
progress: 0,
|
||||
rawFile: file,
|
||||
status: 'uploading',
|
||||
url: '',
|
||||
});
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
|
Reference in New Issue
Block a user