rapid-spreadjs 1.0.21 → 1.0.22
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/index.cjs.js +10 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.js +10 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/utils/wookbook.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -7765,18 +7765,22 @@ const WorkbookUtils = {
|
|
|
7765
7765
|
// 文件的字节流对象
|
|
7766
7766
|
const blob = yield response.blob();
|
|
7767
7767
|
// 将Blob转换为File或Blob对象
|
|
7768
|
-
new File([blob], 'template.sjs', { type: 'application/octet-stream' });
|
|
7768
|
+
// const file = new File([blob], 'template.sjs', { type: 'application/octet-stream' });
|
|
7769
7769
|
const sjsBlob = new Blob([blob], { type: 'application/zip' });
|
|
7770
7770
|
// SpreadJS打开文件
|
|
7771
|
-
spread.open(sjsBlob, () => {
|
|
7771
|
+
spread.open(sjsBlob, () => __awaiter(void 0, void 0, void 0, function* () {
|
|
7772
7772
|
if (typeof succFunc === 'function') {
|
|
7773
|
-
succFunc(spread);
|
|
7773
|
+
yield succFunc(spread);
|
|
7774
|
+
// // 或者使用then回调
|
|
7775
|
+
// succFunc(spread).then((ret) => {
|
|
7776
|
+
// // return ret;
|
|
7777
|
+
// });
|
|
7774
7778
|
}
|
|
7775
|
-
}, (e) => {
|
|
7779
|
+
}), (e) => __awaiter(void 0, void 0, void 0, function* () {
|
|
7776
7780
|
if (typeof errorFunc === 'function') {
|
|
7777
|
-
errorFunc(e);
|
|
7781
|
+
yield errorFunc(e);
|
|
7778
7782
|
}
|
|
7779
|
-
});
|
|
7783
|
+
}));
|
|
7780
7784
|
}
|
|
7781
7785
|
}),
|
|
7782
7786
|
/**
|