emacroh5lib 1.0.74 → 1.0.75

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emacroh5lib",
3
- "version": "1.0.74",
3
+ "version": "1.0.75",
4
4
  "description": "EMacro前端组件库",
5
5
  "main": "dist/emacroh5lib.min.js",
6
6
  "scripts": {
@@ -65,7 +65,6 @@ export namespace EMacro {
65
65
  throw new Error("文件异常")
66
66
  }
67
67
 
68
-
69
68
  for (let i = 0; i < files.length; i++) {
70
69
  const file = files[i];
71
70
  const md5 = await File.getFileMD5(file)
@@ -105,7 +104,7 @@ export namespace EMacro {
105
104
  completeHandle(files)
106
105
  }
107
106
 
108
- public static selectFile(options: any = { multiple: true, accept: "*/*" }, isDirectory = true): Promise<FileList | null> {
107
+ public static selectFile(options: any = { multiple: true, accept: "*/*" }, isDirectory = false): Promise<FileList | null> {
109
108
  return new Promise((res: (value: FileList) => void, rej) => {
110
109
  const el = document.createElement("input");
111
110
  el.type = "file";
@@ -115,7 +114,7 @@ export namespace EMacro {
115
114
  el.addEventListener("change", (_) => {
116
115
  try {
117
116
  if (el.files === null) {
118
- rej(null)
117
+ rej(null);
119
118
  } else {
120
119
  res(el.files);
121
120
  }