emacroh5lib 1.0.96 → 1.0.98
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.
@@ -46,6 +46,31 @@ version 0.6.9
|
|
46
46
|
* @license MIT
|
47
47
|
*/
|
48
48
|
|
49
|
+
/**
|
50
|
+
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
51
|
+
* @version {{version}}
|
52
|
+
* @license
|
53
|
+
* Copyright (c) 2016 Federico Zivolo and contributors
|
54
|
+
*
|
55
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
56
|
+
* of this software and associated documentation files (the "Software"), to deal
|
57
|
+
* in the Software without restriction, including without limitation the rights
|
58
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
59
|
+
* copies of the Software, and to permit persons to whom the Software is
|
60
|
+
* furnished to do so, subject to the following conditions:
|
61
|
+
*
|
62
|
+
* The above copyright notice and this permission notice shall be included in all
|
63
|
+
* copies or substantial portions of the Software.
|
64
|
+
*
|
65
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
66
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
67
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
68
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
69
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
70
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
71
|
+
* SOFTWARE.
|
72
|
+
*/
|
73
|
+
|
49
74
|
/**
|
50
75
|
* @license
|
51
76
|
* Copyright 2010-2022 Three.js Authors
|
package/package.json
CHANGED
package/src/utilities/EMacro.ts
CHANGED
@@ -16,22 +16,20 @@ import { saveAs } from 'file-saver';
|
|
16
16
|
|
17
17
|
public static getFileMD5(file) {
|
18
18
|
return new Promise((resolve, reject) => {
|
19
|
-
|
20
19
|
const fileReader = new FileReader()
|
21
|
-
fileReader.readAsBinaryString(file);
|
22
20
|
fileReader.onload = e => {
|
23
21
|
const bmf = new BMF();
|
24
22
|
bmf.md5(file, (err, md5) => {
|
25
23
|
if (err !== null) {
|
26
|
-
|
24
|
+
return reject(err)
|
27
25
|
} else {
|
28
|
-
|
26
|
+
return resolve(md5)
|
29
27
|
}
|
30
28
|
}, progress => {
|
31
29
|
console.log('getFileMD5 progress number:', progress);
|
32
30
|
});
|
33
31
|
}
|
34
|
-
|
32
|
+
fileReader.readAsBinaryString(file);
|
35
33
|
})
|
36
34
|
}
|
37
35
|
|
@@ -355,36 +355,40 @@ export default class TestView extends Vue {
|
|
355
355
|
public selectFile(e) {
|
356
356
|
EMacro.File.selectFile()
|
357
357
|
.then((files) => {
|
358
|
+
|
359
|
+
console.log('上传文件1', files);
|
358
360
|
EMacro.File.uploadFiles(files, (file) => {
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
}
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
361
|
+
|
362
|
+
|
363
|
+
console.log('上传文件2', file);
|
364
|
+
|
365
|
+
// file.savePath = "C:\\MES\\EMacroAndroidServer_Windows_v1.1\\EMacroAssets\\file\\" + file.fileName;
|
366
|
+
|
367
|
+
// let postData = {
|
368
|
+
// id: 0,
|
369
|
+
// message: "",
|
370
|
+
// action: "uploadSOPFile",
|
371
|
+
// user: {},
|
372
|
+
// data: file,
|
373
|
+
// };
|
374
|
+
// axios
|
375
|
+
// .post(
|
376
|
+
// "http://121.228.113.68:8019/H5/prod/Command/requestVueData",
|
377
|
+
// postData,
|
378
|
+
// {
|
379
|
+
// timeout: 6000,
|
380
|
+
// headers: {
|
381
|
+
// Authorization: "Basic RU1hY3JvOkVNYWNybw==",
|
382
|
+
// "Content-Type": "application/json;charset=UTF-8",
|
383
|
+
// },
|
384
|
+
// }
|
385
|
+
// )
|
386
|
+
// .then((data) => {
|
387
|
+
// console.log("上传返回", data);
|
388
|
+
// })
|
389
|
+
// .catch((err) => {
|
390
|
+
// console.error("上传错误: ", err);
|
391
|
+
// });
|
388
392
|
});
|
389
393
|
})
|
390
394
|
.catch((err) => {
|
package/webpack.config.js
CHANGED
@@ -18,7 +18,7 @@ const stylesHandler = isProduction
|
|
18
18
|
? MiniCssExtractPlugin.loader
|
19
19
|
: "style-loader";
|
20
20
|
|
21
|
-
const config = {
|
21
|
+
const config = {
|
22
22
|
entry: "./src/index.ts",
|
23
23
|
experiments: {
|
24
24
|
outputModule: true,
|
@@ -59,12 +59,13 @@ const config = {
|
|
59
59
|
// 可选的 terser 配置选项
|
60
60
|
// 详细配置请参考 https://github.com/terser/terser
|
61
61
|
terserOptions: {
|
62
|
-
compress:
|
63
|
-
mangle:
|
62
|
+
compress: false, // 禁用压缩
|
63
|
+
mangle: false, // 禁用代码混淆
|
64
64
|
},
|
65
65
|
}),
|
66
66
|
],
|
67
67
|
sideEffects: true,
|
68
|
+
runtimeChunk: false
|
68
69
|
// splitChunks: {
|
69
70
|
// chunks: 'all'
|
70
71
|
// }
|