declare dom file type

This commit is contained in:
Simba
2020-09-08 00:03:52 +08:00
parent d856e81c5f
commit c127440207
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -301,7 +301,7 @@ export default class List extends TankComponent<IProps, IState> {
uploadDirectory = async () => {
const dirPathUuidMap: any = {}; // 存储已经创建好的文件夹map
for (let i = 0; i < this.tempUploadList.length; i++) {
const file: any = this.tempUploadList[i];
const file: File = this.tempUploadList[i];
const paths = file.webkitRelativePath.split("/");
const pPaths = paths.slice(0, paths.length - 1);
const pPathStr = pPaths.join("/");
+4
View File
@@ -79,3 +79,7 @@ declare module 'comma-separated-values' {
import CSV from 'comma-separated-values';
export default CSV;
}
declare interface File {
webkitRelativePath: string;
}