@myun/gimi-chat 0.9.13 → 0.9.15
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/dist/utils/tools.js
CHANGED
|
@@ -15,6 +15,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
15
15
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
16
16
|
import { FileStatus } from "../interfaces/fileInterface";
|
|
17
17
|
import { set, cloneDeep } from 'lodash';
|
|
18
|
+
import { Toast } from "@douyinfe/semi-ui";
|
|
18
19
|
export function downloadExcelByUrl(_x) {
|
|
19
20
|
return _downloadExcelByUrl.apply(this, arguments);
|
|
20
21
|
}
|
|
@@ -51,23 +52,24 @@ function _downloadExcelByUrl() {
|
|
|
51
52
|
link.download = fileName;
|
|
52
53
|
document.body.appendChild(link);
|
|
53
54
|
link.click();
|
|
55
|
+
Toast.success('下载成功');
|
|
54
56
|
|
|
55
57
|
// 清理资源
|
|
56
58
|
setTimeout(function () {
|
|
57
59
|
document.body.removeChild(link);
|
|
58
60
|
URL.revokeObjectURL(objectUrl); // 释放内存
|
|
59
61
|
}, 0);
|
|
60
|
-
_context2.next =
|
|
62
|
+
_context2.next = 23;
|
|
61
63
|
break;
|
|
62
|
-
case
|
|
63
|
-
_context2.prev =
|
|
64
|
+
case 20:
|
|
65
|
+
_context2.prev = 20;
|
|
64
66
|
_context2.t0 = _context2["catch"](1);
|
|
65
67
|
console.error('下载失败:', _context2.t0);
|
|
66
|
-
case
|
|
68
|
+
case 23:
|
|
67
69
|
case "end":
|
|
68
70
|
return _context2.stop();
|
|
69
71
|
}
|
|
70
|
-
}, _callee2, null, [[1,
|
|
72
|
+
}, _callee2, null, [[1, 20]]);
|
|
71
73
|
}));
|
|
72
74
|
return _downloadExcelByUrl.apply(this, arguments);
|
|
73
75
|
}
|