@gonsin/gview 2.0.120 → 2.0.121

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.
Files changed (2) hide show
  1. package/dist/index.mjs +7 -9
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -545,16 +545,14 @@ function Oo(o, e = "", t = "blob", n = {}) {
545
545
  ...l !== "" ? { token: l } : {},
546
546
  lang: s
547
547
  }
548
- }).then((i) => {
548
+ }).then(async (i) => {
549
549
  if (i.status == 200) {
550
550
  if (i.data.type == "application/json") {
551
- new Blob([i.data]).text().then((b) => {
552
- const C = JSON.parse(b);
553
- C !== null && Object.keys(C).includes("state") && C.state !== 200 && Me.error(
554
- `${Wt.t("下载失败")} ${C.message}`
555
- );
556
- });
557
- return;
551
+ const b = new Blob([i.data]).text(), C = JSON.parse(await b);
552
+ if (C !== null && Object.keys(C).includes("state") && C.state !== 200) {
553
+ Me.error(`${Wt.t("下载失败")} ${C.message}`);
554
+ return;
555
+ }
558
556
  }
559
557
  let u = "";
560
558
  const f = i.headers["content-disposition"];
@@ -10856,7 +10854,7 @@ const Za = /* @__PURE__ */ it($u, [["__scopeId", "data-v-75fdffa5"]]), Kc = /* @
10856
10854
  o.directive(e, Yn[e]);
10857
10855
  });
10858
10856
  }
10859
- }, ju = "@gonsin/gview", zu = "2.0.120", Hu = "dist/index.mjs", Wu = "dist/types/index.d.ts", Gu = [
10857
+ }, ju = "@gonsin/gview", zu = "2.0.121", Hu = "dist/index.mjs", Wu = "dist/types/index.d.ts", Gu = [
10860
10858
  "dist",
10861
10859
  "README.md",
10862
10860
  "CHANGELOG.md"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gonsin/gview",
3
- "version": "2.0.120",
3
+ "version": "2.0.121",
4
4
  "main": "dist/index.mjs",
5
5
  "typings": "dist/types/index.d.ts",
6
6
  "files": [