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 CHANGED
@@ -7787,18 +7787,22 @@ const WorkbookUtils = {
7787
7787
  // 文件的字节流对象
7788
7788
  const blob = yield response.blob();
7789
7789
  // 将Blob转换为File或Blob对象
7790
- new File([blob], 'template.sjs', { type: 'application/octet-stream' });
7790
+ // const file = new File([blob], 'template.sjs', { type: 'application/octet-stream' });
7791
7791
  const sjsBlob = new Blob([blob], { type: 'application/zip' });
7792
7792
  // SpreadJS打开文件
7793
- spread.open(sjsBlob, () => {
7793
+ spread.open(sjsBlob, () => __awaiter(void 0, void 0, void 0, function* () {
7794
7794
  if (typeof succFunc === 'function') {
7795
- succFunc(spread);
7795
+ yield succFunc(spread);
7796
+ // // 或者使用then回调
7797
+ // succFunc(spread).then((ret) => {
7798
+ // // return ret;
7799
+ // });
7796
7800
  }
7797
- }, (e) => {
7801
+ }), (e) => __awaiter(void 0, void 0, void 0, function* () {
7798
7802
  if (typeof errorFunc === 'function') {
7799
- errorFunc(e);
7803
+ yield errorFunc(e);
7800
7804
  }
7801
- });
7805
+ }));
7802
7806
  }
7803
7807
  }),
7804
7808
  /**