@base-web-kits/base-tools-web 1.2.5 → 1.2.6
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 +7 -7
- package/dist/base-tools-web.umd.global.js.map +1 -1
- package/dist/index.cjs +947 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +962 -196
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1002,10 +1002,10 @@ var baseToolsWeb = (() => {
|
|
|
1002
1002
|
div.innerHTML = html;
|
|
1003
1003
|
document.body.appendChild(div);
|
|
1004
1004
|
const selection = window.getSelection();
|
|
1005
|
-
const
|
|
1006
|
-
|
|
1005
|
+
const range = document.createRange();
|
|
1006
|
+
range.selectNodeContents(div);
|
|
1007
1007
|
selection == null ? void 0 : selection.removeAllRanges();
|
|
1008
|
-
selection == null ? void 0 : selection.addRange(
|
|
1008
|
+
selection == null ? void 0 : selection.addRange(range);
|
|
1009
1009
|
const ok = document.execCommand("copy");
|
|
1010
1010
|
document.body.removeChild(div);
|
|
1011
1011
|
selection == null ? void 0 : selection.removeAllRanges();
|
|
@@ -1804,7 +1804,7 @@ var baseToolsWeb = (() => {
|
|
|
1804
1804
|
cacheTime,
|
|
1805
1805
|
resMap,
|
|
1806
1806
|
responseType = "json",
|
|
1807
|
-
timeout
|
|
1807
|
+
timeout = 6e4,
|
|
1808
1808
|
onTaskReady
|
|
1809
1809
|
} = config;
|
|
1810
1810
|
const controller = new AbortController();
|
|
@@ -1874,7 +1874,7 @@ var baseToolsWeb = (() => {
|
|
|
1874
1874
|
const timeoutId = setTimeout(() => {
|
|
1875
1875
|
isTimeout = true;
|
|
1876
1876
|
controller.abort();
|
|
1877
|
-
},
|
|
1877
|
+
}, timeout);
|
|
1878
1878
|
try {
|
|
1879
1879
|
const response = yield fetch(fillUrl, {
|
|
1880
1880
|
method,
|
|
@@ -2117,7 +2117,7 @@ var baseToolsWeb = (() => {
|
|
|
2117
2117
|
return new Promise((resolve, reject) => {
|
|
2118
2118
|
var _a;
|
|
2119
2119
|
const xhr = new XMLHttpRequest();
|
|
2120
|
-
const { url, file, name = "file", header, formData, timeout
|
|
2120
|
+
const { url, file, name = "file", header, formData, timeout = 0 } = option;
|
|
2121
2121
|
const fail = (error) => reject(error);
|
|
2122
2122
|
const success = (responseText) => {
|
|
2123
2123
|
resolve(responseText);
|
|
@@ -2155,7 +2155,7 @@ var baseToolsWeb = (() => {
|
|
|
2155
2155
|
if (v !== void 0 && v !== null && v !== "") xhr.setRequestHeader(k, String(v));
|
|
2156
2156
|
});
|
|
2157
2157
|
}
|
|
2158
|
-
xhr.timeout =
|
|
2158
|
+
xhr.timeout = timeout;
|
|
2159
2159
|
const data = new FormData();
|
|
2160
2160
|
if (formData) {
|
|
2161
2161
|
Object.entries(formData).forEach(([k, v]) => {
|