emacroh5lib 1.0.70 → 1.0.71

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.70",
3
+ "version": "1.0.71",
4
4
  "description": "EMacro前端组件库",
5
5
  "main": "dist/emacroh5lib.min.js",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- import { EMacro } from "./utilities/File";
2
+ import { EMacro } from "./utilities/EMacro";
3
3
 
4
4
 
5
5
  import FileViewer from './views/FileViewer/index.vue'
@@ -238,8 +238,11 @@ export namespace EMacro {
238
238
  return base64;
239
239
  }
240
240
 
241
-
242
-
241
+ export const extensionToLowerCase = (fileName: string) => {
242
+ const n = fileName.lastIndexOf(".");
243
+ const extension = fileName.substring(n).toLowerCase();
244
+ return fileName.substring(0, n) + extension;
245
+ }
243
246
 
244
247
  }
245
248
 
@@ -122,9 +122,7 @@
122
122
  this.index = this.currentIndex;
123
123
  this.init();
124
124
 
125
- setTimeout(() => {
126
- this.switchAction("prev");
127
- }, 100);
125
+ setTimeout(() => { this.switchAction("prev"); }, 200);
128
126
  } else {
129
127
  this.$emit("close");
130
128
  }
@@ -198,11 +196,10 @@
198
196
 
199
197
  Promise.race(promises).then((data) => {
200
198
 
199
+ this.image = this.$refs["duoViewerImage"];
201
200
  setTimeout(() => {
202
201
  this.switchAction("prev");
203
- }, 100);
204
-
205
- this.image = this.$refs["duoViewerImage"];
202
+ }, 200);
206
203
  this.initDrag();
207
204
  this.$emit("loadComplete");
208
205
  const { width, height } = this.listDataCache[index];