@base-web-kits/base-tools-web 1.2.4 → 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.
@@ -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 range2 = document.createRange();
1006
- range2.selectNodeContents(div);
1005
+ const range = document.createRange();
1006
+ range.selectNodeContents(div);
1007
1007
  selection == null ? void 0 : selection.removeAllRanges();
1008
- selection == null ? void 0 : selection.addRange(range2);
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: timeout2 = 6e4,
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
- }, timeout2);
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: timeout2 = 0 } = option;
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,14 +2155,14 @@ var baseToolsWeb = (() => {
2155
2155
  if (v !== void 0 && v !== null && v !== "") xhr.setRequestHeader(k, String(v));
2156
2156
  });
2157
2157
  }
2158
- xhr.timeout = timeout2;
2158
+ xhr.timeout = timeout;
2159
2159
  const data = new FormData();
2160
- data.append(name, file);
2161
2160
  if (formData) {
2162
2161
  Object.entries(formData).forEach(([k, v]) => {
2163
2162
  if (v !== void 0 && v !== null) data.append(k, String(v));
2164
2163
  });
2165
2164
  }
2165
+ data.append(name, file);
2166
2166
  xhr.send(data);
2167
2167
  });
2168
2168
  }