emacroh5lib 1.0.75 → 1.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/utilities/EMacro.ts
CHANGED
@@ -90,12 +90,13 @@ export namespace EMacro {
|
|
90
90
|
'chunkSize': chunk.size, // 当前分片实际大小
|
91
91
|
'fileSize': file.size, // 文件总大小
|
92
92
|
'fileName': file.name, // 文件名
|
93
|
-
'data': base64.split(';base64,')[1], // 文件数据
|
94
93
|
'lastModifiedDate': file.lastModifiedDate, // 最后修改时间
|
95
94
|
'md5': md5,
|
96
95
|
'index': i,
|
97
96
|
'dataType': 'base64', // 数据的类型
|
98
|
-
'directoryName': directoryName // 数据的类型
|
97
|
+
'directoryName': directoryName, // 数据的类型
|
98
|
+
'total': files.length, // 总共文件数
|
99
|
+
'data': base64.split(';base64,')[1], // 文件数据
|
99
100
|
}
|
100
101
|
await chunkFileHandle(chunkFile)
|
101
102
|
}
|
@@ -104,7 +105,7 @@ export namespace EMacro {
|
|
104
105
|
completeHandle(files)
|
105
106
|
}
|
106
107
|
|
107
|
-
public static selectFile(options: any = { multiple: true, accept: "*/*" }, isDirectory =
|
108
|
+
public static selectFile(options: any = { multiple: true, accept: "*/*" }, isDirectory = true): Promise<FileList | null> {
|
108
109
|
return new Promise((res: (value: FileList) => void, rej) => {
|
109
110
|
const el = document.createElement("input");
|
110
111
|
el.type = "file";
|