ps-toolkit-ui 1.19.2 → 1.19.3
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/bundles/ps-toolkit-ui.umd.js +8 -3
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/request.class.js +7 -4
- package/fesm2015/ps-toolkit-ui.js +6 -3
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/request.class.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1935,10 +1935,11 @@
|
|
|
1935
1935
|
}
|
|
1936
1936
|
});
|
|
1937
1937
|
};
|
|
1938
|
-
RequestClass.prototype.sendCu = function (url, method, data, btn, success, failure) {
|
|
1938
|
+
RequestClass.prototype.sendCu = function (url, method, data, btn, success, failure, timeout) {
|
|
1939
1939
|
if (btn === void 0) { btn = null; }
|
|
1940
1940
|
if (success === void 0) { success = null; }
|
|
1941
1941
|
if (failure === void 0) { failure = null; }
|
|
1942
|
+
if (timeout === void 0) { timeout = null; }
|
|
1942
1943
|
if (btn) {
|
|
1943
1944
|
if (btn.loading) {
|
|
1944
1945
|
return;
|
|
@@ -1962,10 +1963,11 @@
|
|
|
1962
1963
|
if (btn) {
|
|
1963
1964
|
btn.loading = false;
|
|
1964
1965
|
}
|
|
1965
|
-
});
|
|
1966
|
+
}, timeout);
|
|
1966
1967
|
};
|
|
1967
|
-
RequestClass.prototype.getClient = function (request, url, method, data, done, fail) {
|
|
1968
|
+
RequestClass.prototype.getClient = function (request, url, method, data, done, fail, timeout) {
|
|
1968
1969
|
var _this = this;
|
|
1970
|
+
if (timeout === void 0) { timeout = null; }
|
|
1969
1971
|
var token = HelperClass.getCookie('Authorization');
|
|
1970
1972
|
if (!(data instanceof FormData)) {
|
|
1971
1973
|
data = HelperClass.jsonToFormData(data);
|
|
@@ -1978,6 +1980,9 @@
|
|
|
1978
1980
|
data: data,
|
|
1979
1981
|
headers: token == null ? {} : { Authorization: token }
|
|
1980
1982
|
};
|
|
1983
|
+
if (timeout != null) {
|
|
1984
|
+
settings.timeout = timeout;
|
|
1985
|
+
}
|
|
1981
1986
|
if (request != null) {
|
|
1982
1987
|
request.abort();
|
|
1983
1988
|
}
|