@base-web-kits/base-tools-web 1.2.6 → 1.2.7
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/base-tools-web.umd.global.js +0 -13
- package/dist/base-tools-web.umd.global.js.map +1 -1
- package/dist/index.cjs +4 -951
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +640 -0
- package/dist/index.js +4 -954
- package/dist/index.js.map +1 -1
- package/dist/network/download.d.ts +0 -14
- package/dist/network/download.d.ts.map +1 -1
- package/dist/network/request.d.ts.map +1 -1
- package/package.json +1 -12
- package/src/web/async/index.ts +1 -1
- package/src/web/network/download.ts +0 -27
- package/src/web/network/request.ts +4 -7
|
@@ -787,7 +787,6 @@ var baseToolsWeb = (() => {
|
|
|
787
787
|
loadCss: () => loadCss,
|
|
788
788
|
loadJs: () => loadJs,
|
|
789
789
|
lockBodyScroll: () => lockBodyScroll,
|
|
790
|
-
parseAxiosBlob: () => parseAxiosBlob,
|
|
791
790
|
preloadImage: () => preloadImage,
|
|
792
791
|
removeCookie: () => removeCookie,
|
|
793
792
|
removeLocalStorage: () => removeLocalStorage,
|
|
@@ -1220,18 +1219,6 @@ var baseToolsWeb = (() => {
|
|
|
1220
1219
|
}
|
|
1221
1220
|
});
|
|
1222
1221
|
}
|
|
1223
|
-
function parseAxiosBlob(res) {
|
|
1224
|
-
return __async(this, null, function* () {
|
|
1225
|
-
const { data, headers, status, statusText, config } = res;
|
|
1226
|
-
if (status < 200 || status >= 300) throw new Error(`${status}\uFF0C${statusText}\uFF1A${config.url}`);
|
|
1227
|
-
if (data.type.includes("application/json")) {
|
|
1228
|
-
const txt = yield data.text();
|
|
1229
|
-
throw JSON.parse(txt);
|
|
1230
|
-
}
|
|
1231
|
-
const fileName = getDispositionFileName(headers["content-disposition"]);
|
|
1232
|
-
return { blob: data, fileName };
|
|
1233
|
-
});
|
|
1234
|
-
}
|
|
1235
1222
|
function getDispositionFileName(disposition) {
|
|
1236
1223
|
var _a;
|
|
1237
1224
|
if (!disposition) return "";
|