@das-fed/utils 6.4.0-dev.55.8 → 6.4.0-dev.56
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/api-services/i18n/index.js +1 -1
- package/api-services/i18n/index.js.gz +0 -0
- package/api-services/index.js +128 -128
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +94 -94
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +94 -94
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +93 -93
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +94 -94
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +92 -92
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +94 -94
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +125 -125
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +94 -94
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +165 -165
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +95 -95
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +92 -92
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +94 -94
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +94 -94
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +94 -94
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +96 -96
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +94 -94
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +94 -94
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +95 -95
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +95 -95
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +94 -94
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +94 -94
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +94 -94
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +93 -93
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/getInfoFromUrl/index.js.gz +0 -0
- package/common-info/index.d.ts +7 -1
- package/common-info/index.js +84 -51
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-info/type.d.ts +175 -120
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/common-tools/get-url-params/index.js.gz +0 -0
- package/create-api-service/i18n/index.js +2 -2
- package/create-api-service/index.js +93 -93
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.js +35 -35
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/index.js.gz +0 -0
- package/curring-http/type.d.ts +87 -87
- package/directive/auth/index.js.gz +0 -0
- package/dom-check-in/index.js +2 -2
- package/esm-map.json +3 -1
- package/hooks/use-get-auth/index.js.gz +0 -0
- package/nextTiken/index.js.gz +0 -0
- package/package.json +4 -4
- package/pinyin-first-character/index.js.gz +0 -0
- package/style/index.js.gz +0 -0
- package/use-low-code/index.js +3 -3
- package/use-low-code/index.js.gz +0 -0
- package/use-low-code/style.css +1 -1
- package/webSocket-service/index.js.gz +0 -0
- package/webSocket-service/type.d.ts +28 -28
|
@@ -301,10 +301,10 @@ function Ue(e, t, n) {
|
|
|
301
301
|
return o = ft(o), !n && s ? "[" + o + "]" : o;
|
|
302
302
|
}).join(n ? "." : "") : t;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function kn(e) {
|
|
305
305
|
return a.isArray(e) && !e.some(de);
|
|
306
306
|
}
|
|
307
|
-
const
|
|
307
|
+
const Cn = a.toFlatObject(a, {}, null, function(t) {
|
|
308
308
|
return /^is[A-Z]/.test(t);
|
|
309
309
|
});
|
|
310
310
|
function se(e, t, n) {
|
|
@@ -333,18 +333,18 @@ function se(e, t, n) {
|
|
|
333
333
|
if (p && !h && typeof p == "object") {
|
|
334
334
|
if (a.endsWith(m, "{}"))
|
|
335
335
|
m = r ? m : m.slice(0, -2), p = JSON.stringify(p);
|
|
336
|
-
else if (a.isArray(p) &&
|
|
337
|
-
return m = ft(m), E.forEach(function(R,
|
|
336
|
+
else if (a.isArray(p) && kn(p) || (a.isFileList(p) || a.endsWith(m, "[]")) && (E = a.toArray(p)))
|
|
337
|
+
return m = ft(m), E.forEach(function(R, k) {
|
|
338
338
|
!(a.isUndefined(R) || R === null) && t.append(
|
|
339
339
|
// eslint-disable-next-line no-nested-ternary
|
|
340
|
-
i === !0 ? Ue([m],
|
|
340
|
+
i === !0 ? Ue([m], k, s) : i === null ? m : m + "[]",
|
|
341
341
|
l(R)
|
|
342
342
|
);
|
|
343
343
|
}), !1;
|
|
344
344
|
}
|
|
345
345
|
return de(p) ? !0 : (t.append(Ue(h, m, s), l(p)), !1);
|
|
346
346
|
}
|
|
347
|
-
const d = [], w = Object.assign(
|
|
347
|
+
const d = [], w = Object.assign(Cn, {
|
|
348
348
|
defaultVisitor: u,
|
|
349
349
|
convertValue: l,
|
|
350
350
|
isVisitable: de
|
|
@@ -1069,16 +1069,16 @@ const bt = (e) => {
|
|
|
1069
1069
|
}, h.onerror = function() {
|
|
1070
1070
|
r(new y("Network Error", y.ERR_NETWORK, e, h)), h = null;
|
|
1071
1071
|
}, h.ontimeout = function() {
|
|
1072
|
-
let
|
|
1072
|
+
let k = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1073
1073
|
const T = o.transitional || ht;
|
|
1074
|
-
o.timeoutErrorMessage && (
|
|
1075
|
-
|
|
1074
|
+
o.timeoutErrorMessage && (k = o.timeoutErrorMessage), r(new y(
|
|
1075
|
+
k,
|
|
1076
1076
|
T.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1077
1077
|
e,
|
|
1078
1078
|
h
|
|
1079
1079
|
)), h = null;
|
|
1080
|
-
}, s === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(
|
|
1081
|
-
h.setRequestHeader(T,
|
|
1080
|
+
}, s === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(k, T) {
|
|
1081
|
+
h.setRequestHeader(T, k);
|
|
1082
1082
|
}), a.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), c && c !== "json" && (h.responseType = o.responseType), l && ([w, p] = ee(l, !0), h.addEventListener("progress", w)), f && h.upload && ([d, g] = ee(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", g)), (o.cancelToken || o.signal) && (u = (R) => {
|
|
1083
1083
|
h && (r(!R || R.type ? new j(null, e, h) : R), h.abort(), h = null);
|
|
1084
1084
|
}, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
|
|
@@ -1239,8 +1239,8 @@ const lr = async (e) => {
|
|
|
1239
1239
|
method: "POST",
|
|
1240
1240
|
body: r,
|
|
1241
1241
|
duplex: "half"
|
|
1242
|
-
}),
|
|
1243
|
-
if (a.isFormData(r) && (
|
|
1242
|
+
}), C;
|
|
1243
|
+
if (a.isFormData(r) && (C = T.headers.get("content-type")) && u.setContentType(C), T.body) {
|
|
1244
1244
|
const [N, K] = Fe(
|
|
1245
1245
|
h,
|
|
1246
1246
|
ee(Be(f))
|
|
@@ -1263,11 +1263,11 @@ const lr = async (e) => {
|
|
|
1263
1263
|
const R = he && (l === "stream" || l === "response");
|
|
1264
1264
|
if (he && (c || R && m)) {
|
|
1265
1265
|
const T = {};
|
|
1266
|
-
["status", "statusText", "headers"].forEach((
|
|
1267
|
-
T[
|
|
1266
|
+
["status", "statusText", "headers"].forEach((Ce) => {
|
|
1267
|
+
T[Ce] = S[Ce];
|
|
1268
1268
|
});
|
|
1269
|
-
const
|
|
1270
|
-
|
|
1269
|
+
const C = a.toFiniteNumber(S.headers.get("content-length")), [N, K] = c && Fe(
|
|
1270
|
+
C,
|
|
1271
1271
|
ee(Be(c), !0)
|
|
1272
1272
|
) || [];
|
|
1273
1273
|
S = new Response(
|
|
@@ -1278,10 +1278,10 @@ const lr = async (e) => {
|
|
|
1278
1278
|
);
|
|
1279
1279
|
}
|
|
1280
1280
|
l = l || "text";
|
|
1281
|
-
let
|
|
1282
|
-
return !R && m && m(), await new Promise((T,
|
|
1283
|
-
wt(T,
|
|
1284
|
-
data:
|
|
1281
|
+
let k = await te[a.findKey(te, l) || "text"](S, e);
|
|
1282
|
+
return !R && m && m(), await new Promise((T, C) => {
|
|
1283
|
+
wt(T, C, {
|
|
1284
|
+
data: k,
|
|
1285
1285
|
headers: A.from(S.headers),
|
|
1286
1286
|
status: S.status,
|
|
1287
1287
|
statusText: S.statusText,
|
|
@@ -1775,7 +1775,7 @@ var gr = ge(wr, { path: "/" }), $e;
|
|
|
1775
1775
|
const At = typeof window < "u", br = (e) => typeof e == "string", Je = () => +Date.now(), be = () => {
|
|
1776
1776
|
};
|
|
1777
1777
|
At && (($e = window == null ? void 0 : window.navigator) != null && $e.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
1778
|
-
function
|
|
1778
|
+
function ke(e) {
|
|
1779
1779
|
return typeof e == "function" ? e() : Ut(e);
|
|
1780
1780
|
}
|
|
1781
1781
|
function Er(e, t) {
|
|
@@ -1792,7 +1792,7 @@ function Sr(e, t = !0, n = !0, r = !1) {
|
|
|
1792
1792
|
s && (clearTimeout(s), s = void 0, c(), c = be);
|
|
1793
1793
|
};
|
|
1794
1794
|
return (d) => {
|
|
1795
|
-
const w =
|
|
1795
|
+
const w = ke(e), g = Date.now() - o, p = () => f = d();
|
|
1796
1796
|
return l(), w <= 0 ? (o = Date.now(), p()) : (g > w && (n || !i) ? (o = Date.now(), p()) : t && (f = new Promise((m, h) => {
|
|
1797
1797
|
c = r ? h : m, s = setTimeout(() => {
|
|
1798
1798
|
o = Date.now(), i = !0, m(p()), l();
|
|
@@ -1808,7 +1808,7 @@ function Tr(e) {
|
|
|
1808
1808
|
}
|
|
1809
1809
|
function Or(e) {
|
|
1810
1810
|
var t;
|
|
1811
|
-
const n =
|
|
1811
|
+
const n = ke(e);
|
|
1812
1812
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
1813
1813
|
}
|
|
1814
1814
|
const _t = At ? window : void 0;
|
|
@@ -1819,7 +1819,7 @@ function Ve(...e) {
|
|
|
1819
1819
|
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
|
|
1820
1820
|
const s = [], i = () => {
|
|
1821
1821
|
s.forEach((u) => u()), s.length = 0;
|
|
1822
|
-
}, c = (u, d, w, g) => (u.addEventListener(d, w, g), () => u.removeEventListener(d, w, g)), f = Se(() => [Or(t),
|
|
1822
|
+
}, c = (u, d, w, g) => (u.addEventListener(d, w, g), () => u.removeEventListener(d, w, g)), f = Se(() => [Or(t), ke(o)], ([u, d]) => {
|
|
1823
1823
|
i(), u && s.push(...n.flatMap((w) => r.map((g) => c(u, w, g, d))));
|
|
1824
1824
|
}, { immediate: !0, flush: "post" }), l = () => {
|
|
1825
1825
|
f(), i();
|
|
@@ -1855,9 +1855,9 @@ var Qe;
|
|
|
1855
1855
|
(function(e) {
|
|
1856
1856
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
1857
1857
|
})(Qe || (Qe = {}));
|
|
1858
|
-
var
|
|
1858
|
+
var kr = Object.defineProperty, Ge = Object.getOwnPropertySymbols, Cr = Object.prototype.hasOwnProperty, Pr = Object.prototype.propertyIsEnumerable, Xe = (e, t, n) => t in e ? kr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Nr = (e, t) => {
|
|
1859
1859
|
for (var n in t || (t = {}))
|
|
1860
|
-
|
|
1860
|
+
Cr.call(t, n) && Xe(e, n, t[n]);
|
|
1861
1861
|
if (Ge)
|
|
1862
1862
|
for (var n of Ge(t))
|
|
1863
1863
|
Pr.call(t, n) && Xe(e, n, t[n]);
|
|
@@ -1909,7 +1909,7 @@ const xt = { triggerProxySso: "triggerProxySso" }, Lr = () => {
|
|
|
1909
1909
|
});
|
|
1910
1910
|
};
|
|
1911
1911
|
window.top !== window.self && Lr();
|
|
1912
|
-
let
|
|
1912
|
+
let kt = (e = 21) => {
|
|
1913
1913
|
let t = "", n = crypto.getRandomValues(new Uint8Array(e));
|
|
1914
1914
|
for (; e--; ) {
|
|
1915
1915
|
let r = n[e] & 63;
|
|
@@ -1917,7 +1917,7 @@ let Ct = (e = 21) => {
|
|
|
1917
1917
|
}
|
|
1918
1918
|
return t;
|
|
1919
1919
|
};
|
|
1920
|
-
const
|
|
1920
|
+
const Ct = (e) => new URL(location.href).searchParams.get(e), B = {
|
|
1921
1921
|
oauth: "/api/justauth/oauth-server/v1/visitor/oauth/authorize",
|
|
1922
1922
|
// 重定向到登录页
|
|
1923
1923
|
logoutCurpage: "/api/justauth/oauth-server/v1/visitor/logout-curpage",
|
|
@@ -1936,7 +1936,7 @@ const kt = (e) => new URL(location.href).searchParams.get(e), B = {
|
|
|
1936
1936
|
window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(e));
|
|
1937
1937
|
else {
|
|
1938
1938
|
const t = ["code", "state", "kingdee_token", "redirect_url"];
|
|
1939
|
-
window.history.replaceState(
|
|
1939
|
+
window.history.replaceState({}, "", Ft(t));
|
|
1940
1940
|
}
|
|
1941
1941
|
}, Pt = Y(!1), Nt = (e) => {
|
|
1942
1942
|
if (e <= 0) return;
|
|
@@ -1950,7 +1950,7 @@ const kt = (e) => new URL(location.href).searchParams.get(e), B = {
|
|
|
1950
1950
|
};
|
|
1951
1951
|
localStorage.getItem("idelTime") && Nt(Number(localStorage.getItem("idelTime")));
|
|
1952
1952
|
const Ir = async () => {
|
|
1953
|
-
const e =
|
|
1953
|
+
const e = Ct("code") || "";
|
|
1954
1954
|
if (!e) return H();
|
|
1955
1955
|
const { redirectUri: t } = v().getData(), n = Ye(location.href, "kingdee_token") || "";
|
|
1956
1956
|
let r = {};
|
|
@@ -1961,7 +1961,7 @@ const Ir = async () => {
|
|
|
1961
1961
|
client_secret: F.client_secret,
|
|
1962
1962
|
redirect_uri: t || $,
|
|
1963
1963
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
1964
|
-
nonce:
|
|
1964
|
+
nonce: kt()
|
|
1965
1965
|
};
|
|
1966
1966
|
n && (sessionStorage.setItem("kingdee_token", n), o.redirect_uri = `${o.redirect_uri}?kingdee_token=${n}`);
|
|
1967
1967
|
try {
|
|
@@ -2008,7 +2008,7 @@ const Ir = async () => {
|
|
|
2008
2008
|
}
|
|
2009
2009
|
);
|
|
2010
2010
|
});
|
|
2011
|
-
const { accessTokenExpiredAt: t } = v().getData(), n =
|
|
2011
|
+
const { accessTokenExpiredAt: t } = v().getData(), n = Ct("code") || "";
|
|
2012
2012
|
if ((!H() || t === 0) && !n)
|
|
2013
2013
|
return J({ ...F, redirect_uri: $ });
|
|
2014
2014
|
let r = H();
|
|
@@ -2046,7 +2046,7 @@ const jr = async (e) => {
|
|
|
2046
2046
|
client_id: e.client_id,
|
|
2047
2047
|
client_secret: e.client_secret,
|
|
2048
2048
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
2049
|
-
nonce:
|
|
2049
|
+
nonce: kt()
|
|
2050
2050
|
}
|
|
2051
2051
|
}
|
|
2052
2052
|
), { access_token: s = "", expires_in: i = 0, refresh_token: c = "" } = o.data, f = {
|
|
@@ -2081,7 +2081,7 @@ const jr = async (e) => {
|
|
|
2081
2081
|
}
|
|
2082
2082
|
});
|
|
2083
2083
|
export {
|
|
2084
|
-
|
|
2084
|
+
Ct as getQuery,
|
|
2085
2085
|
Wr as getToken,
|
|
2086
2086
|
Ir as getTokenFromCode,
|
|
2087
2087
|
F as getTokenParams,
|
|
Binary file
|
package/curring-http/index.js.gz
CHANGED
|
Binary file
|
package/curring-http/type.d.ts
CHANGED
|
@@ -1,89 +1,89 @@
|
|
|
1
1
|
import { AxiosInstance, AxiosRequestConfig, AxiosError } from 'axios';
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/** 请求工具配置项 */
|
|
6
|
-
export type CurringConfig = AxiosRequestConfig & {
|
|
7
|
-
/** 请求实例 */
|
|
8
|
-
axiosInstance?: AxiosInstance
|
|
9
|
-
|
|
10
|
-
/** 请求方法 */
|
|
11
|
-
method?: Method
|
|
12
|
-
|
|
13
|
-
/** 请求的body数据 */
|
|
14
|
-
data?: any
|
|
15
|
-
|
|
16
|
-
/** 请求的query数据 */
|
|
17
|
-
params?: any
|
|
18
|
-
|
|
19
|
-
/** 接口地址前缀 */
|
|
20
|
-
urlPrefix?: string
|
|
21
|
-
|
|
22
|
-
/** 标记为公共接口,不需要鉴权,默认为false */
|
|
23
|
-
public?: boolean
|
|
24
|
-
|
|
25
|
-
/** 请求成功执行的回调 */
|
|
26
|
-
onSuccess?: (res: any, config: CurringConfig) => Promise<any>
|
|
27
|
-
|
|
28
|
-
/** 请求失败执行的回调 */
|
|
29
|
-
onError?: (error: any, config: CurringConfig) => Promise<any>
|
|
30
|
-
|
|
31
|
-
/** 自定义处理请求失败执行的回调 */
|
|
32
|
-
onCustomError?: (error: any, config: CurringConfig) => Promise<any>
|
|
33
|
-
|
|
34
|
-
/** 不管请求成功或失败都会执行的回调 */
|
|
35
|
-
finally?: (config: CurringConfig) => any
|
|
36
|
-
|
|
37
|
-
/** 每次请求之前都会执行的函数 */
|
|
38
|
-
beforeRun?: (config: CurringConfig) => Promise<CurringConfig>
|
|
39
|
-
|
|
40
|
-
/** 自定义错误信息 */
|
|
41
|
-
customErrorMessage?: (
|
|
42
|
-
/** 原始错误信息 */
|
|
43
|
-
message: string,
|
|
44
|
-
|
|
45
|
-
/** 原始错误对象 */
|
|
46
|
-
error: any,
|
|
47
|
-
) => string | null | undefined
|
|
48
|
-
|
|
49
|
-
/** 忽略错误提示 */
|
|
50
|
-
ignoreErrorMessage?: boolean
|
|
51
|
-
|
|
52
|
-
/** 接口401是否重定向到登录页 */
|
|
53
|
-
noRedireLogin?: boolean
|
|
54
|
-
|
|
55
|
-
/** 开启CSRF安全选项 */
|
|
56
|
-
csrf?: boolean
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export type Method = 'get' | 'post' | 'put' | 'delete' | 'patch'
|
|
60
|
-
|
|
61
|
-
export type CurringConfigFun = (config: CurringConfig) => CurringConfig | Promise<CurringConfig>
|
|
62
|
-
|
|
63
|
-
export type CurringRes = {
|
|
64
|
-
/** 请求时返回的接口数据 */
|
|
65
|
-
data: Ref<any>
|
|
66
|
-
|
|
67
|
-
/** 请求时的错误信息 */
|
|
68
|
-
error: Ref<any>
|
|
69
|
-
|
|
70
|
-
/** 请求时的loading */
|
|
71
|
-
loading: Ref<boolean>
|
|
72
|
-
|
|
73
|
-
/** 发起请求 返回格式 [ error, data ] */
|
|
74
|
-
run: (payload?: any, config?: CurringConfig) => CurringRunRes
|
|
75
|
-
|
|
76
|
-
/** 取消请求控制器 */
|
|
77
|
-
abortController: Ref<AbortController | null>
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/** 返回为数组 [error, data], 请求成功error为null,请求失败data为null */
|
|
81
|
-
export type CurringRunRes = Promise<
|
|
82
|
-
[
|
|
83
|
-
/** 请求返回的错误信息,请求成功时为null,请求失败时为错误信息 */
|
|
84
|
-
error: { code: string | number; msg: string; error: AxiosError } | null,
|
|
85
|
-
|
|
86
|
-
/** 请求返回的接口数据,请求成功时为后端数据,请求失败时为null */
|
|
87
|
-
data: any | null,
|
|
88
|
-
]
|
|
89
|
-
>
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
/** 请求工具配置项 */
|
|
6
|
+
export type CurringConfig = AxiosRequestConfig & {
|
|
7
|
+
/** 请求实例 */
|
|
8
|
+
axiosInstance?: AxiosInstance
|
|
9
|
+
|
|
10
|
+
/** 请求方法 */
|
|
11
|
+
method?: Method
|
|
12
|
+
|
|
13
|
+
/** 请求的body数据 */
|
|
14
|
+
data?: any
|
|
15
|
+
|
|
16
|
+
/** 请求的query数据 */
|
|
17
|
+
params?: any
|
|
18
|
+
|
|
19
|
+
/** 接口地址前缀 */
|
|
20
|
+
urlPrefix?: string
|
|
21
|
+
|
|
22
|
+
/** 标记为公共接口,不需要鉴权,默认为false */
|
|
23
|
+
public?: boolean
|
|
24
|
+
|
|
25
|
+
/** 请求成功执行的回调 */
|
|
26
|
+
onSuccess?: (res: any, config: CurringConfig) => Promise<any>
|
|
27
|
+
|
|
28
|
+
/** 请求失败执行的回调 */
|
|
29
|
+
onError?: (error: any, config: CurringConfig) => Promise<any>
|
|
30
|
+
|
|
31
|
+
/** 自定义处理请求失败执行的回调 */
|
|
32
|
+
onCustomError?: (error: any, config: CurringConfig) => Promise<any>
|
|
33
|
+
|
|
34
|
+
/** 不管请求成功或失败都会执行的回调 */
|
|
35
|
+
finally?: (config: CurringConfig) => any
|
|
36
|
+
|
|
37
|
+
/** 每次请求之前都会执行的函数 */
|
|
38
|
+
beforeRun?: (config: CurringConfig) => Promise<CurringConfig>
|
|
39
|
+
|
|
40
|
+
/** 自定义错误信息 */
|
|
41
|
+
customErrorMessage?: (
|
|
42
|
+
/** 原始错误信息 */
|
|
43
|
+
message: string,
|
|
44
|
+
|
|
45
|
+
/** 原始错误对象 */
|
|
46
|
+
error: any,
|
|
47
|
+
) => string | null | undefined
|
|
48
|
+
|
|
49
|
+
/** 忽略错误提示 */
|
|
50
|
+
ignoreErrorMessage?: boolean
|
|
51
|
+
|
|
52
|
+
/** 接口401是否重定向到登录页 */
|
|
53
|
+
noRedireLogin?: boolean
|
|
54
|
+
|
|
55
|
+
/** 开启CSRF安全选项 */
|
|
56
|
+
csrf?: boolean
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type Method = 'get' | 'post' | 'put' | 'delete' | 'patch'
|
|
60
|
+
|
|
61
|
+
export type CurringConfigFun = (config: CurringConfig) => CurringConfig | Promise<CurringConfig>
|
|
62
|
+
|
|
63
|
+
export type CurringRes = {
|
|
64
|
+
/** 请求时返回的接口数据 */
|
|
65
|
+
data: Ref<any>
|
|
66
|
+
|
|
67
|
+
/** 请求时的错误信息 */
|
|
68
|
+
error: Ref<any>
|
|
69
|
+
|
|
70
|
+
/** 请求时的loading */
|
|
71
|
+
loading: Ref<boolean>
|
|
72
|
+
|
|
73
|
+
/** 发起请求 返回格式 [ error, data ] */
|
|
74
|
+
run: (payload?: any, config?: CurringConfig) => CurringRunRes
|
|
75
|
+
|
|
76
|
+
/** 取消请求控制器 */
|
|
77
|
+
abortController: Ref<AbortController | null>
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** 返回为数组 [error, data], 请求成功error为null,请求失败data为null */
|
|
81
|
+
export type CurringRunRes = Promise<
|
|
82
|
+
[
|
|
83
|
+
/** 请求返回的错误信息,请求成功时为null,请求失败时为错误信息 */
|
|
84
|
+
error: { code: string | number; msg: string; error: AxiosError } | null,
|
|
85
|
+
|
|
86
|
+
/** 请求返回的接口数据,请求成功时为后端数据,请求失败时为null */
|
|
87
|
+
data: any | null,
|
|
88
|
+
]
|
|
89
|
+
>
|
|
Binary file
|
package/dom-check-in/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const d = (e) => {
|
|
2
2
|
const t = window.event;
|
|
3
|
-
let i = Number(t.clientX), n = Number(t.clientY), l = Number(e.getBoundingClientRect().left),
|
|
4
|
-
return i > l && i <
|
|
3
|
+
let i = Number(t.clientX), n = Number(t.clientY), l = Number(e.getBoundingClientRect().left), r = Number(l + e.clientWidth), c = Number(e.getBoundingClientRect().top), u = Number(c + e.clientHeight);
|
|
4
|
+
return i > l && i < r && n > c && n < u;
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
d as domCheckIn
|
package/esm-map.json
CHANGED
|
@@ -136,5 +136,7 @@
|
|
|
136
136
|
"useKonva": "/dimple-canvas/use-dimple-canvas/core/konva/index",
|
|
137
137
|
"setShowWatermark": "/common-tools/platform-tools/index",
|
|
138
138
|
"extractFilename": "/common-tools/extract-file-name/index",
|
|
139
|
-
"setBrowseTitle": "/common-tools/update-browser-title/index"
|
|
139
|
+
"setBrowseTitle": "/common-tools/update-browser-title/index",
|
|
140
|
+
"getPersonalConfig": "/common-info/index",
|
|
141
|
+
"getProjectMessage": "/common-info/index"
|
|
140
142
|
}
|
|
Binary file
|
package/nextTiken/index.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/utils",
|
|
3
|
-
"version": "6.4.0-dev.
|
|
3
|
+
"version": "6.4.0-dev.56",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"license": "ISC",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@antv/x6": "^2.18.1",
|
|
12
|
-
"@das-fed/utils": "6.4.0-dev.
|
|
12
|
+
"@das-fed/utils": "6.4.0-dev.56",
|
|
13
13
|
"@vue/shared": "^3.4.21",
|
|
14
14
|
"@vueuse/core": "^9.6.0",
|
|
15
15
|
"axios": "^1.6.7",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"vue": "^3.4.21"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@das-fed/cli": "6.4.0-dev.
|
|
25
|
-
"@das-fed/web": "6.4.0-dev.
|
|
24
|
+
"@das-fed/cli": "6.4.0-dev.56",
|
|
25
|
+
"@das-fed/web": "6.4.0-dev.56",
|
|
26
26
|
"@types/js-cookie": "^3.0.6",
|
|
27
27
|
"@types/lodash-es": "^4.17.12",
|
|
28
28
|
"@types/qs": "^6.9.15",
|
|
Binary file
|
package/style/index.js.gz
CHANGED
|
Binary file
|
package/use-low-code/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as v, computed as u, onMounted as g, onBeforeUnmount as _, ref as L, openBlock as y, createElementBlock as h } from "vue";
|
|
2
|
-
const x = ["src"],
|
|
2
|
+
const x = ["src"], C = /* @__PURE__ */ v({
|
|
3
3
|
__name: "low-code-iframe",
|
|
4
4
|
props: {
|
|
5
5
|
app: {},
|
|
@@ -58,12 +58,12 @@ const x = ["src"], b = /* @__PURE__ */ v({
|
|
|
58
58
|
onLoad: w
|
|
59
59
|
}, null, 40, x));
|
|
60
60
|
}
|
|
61
|
-
}),
|
|
61
|
+
}), M = (n, c) => {
|
|
62
62
|
const s = n.__vccOpts || n;
|
|
63
63
|
for (const [a, r] of c)
|
|
64
64
|
s[a] = r;
|
|
65
65
|
return s;
|
|
66
|
-
}, B = /* @__PURE__ */ C
|
|
66
|
+
}, B = /* @__PURE__ */ M(C, [["__scopeId", "data-v-67190e50"]]);
|
|
67
67
|
export {
|
|
68
68
|
B as LowCode
|
|
69
69
|
};
|
package/use-low-code/index.js.gz
CHANGED
|
Binary file
|
package/use-low-code/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.low-code-iframe[data-v-
|
|
1
|
+
.low-code-iframe[data-v-67190e50]{padding:0;margin:0;border:none;outline:none;height:100%;width:100%;min-height:100px;min-width:100px}
|
|
Binary file
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
export type socketConfig = {
|
|
2
|
-
/** 请求地址 */
|
|
3
|
-
url: string
|
|
4
|
-
|
|
5
|
-
/** 请求参数 */
|
|
6
|
-
params?: Record<string, any>
|
|
7
|
-
|
|
8
|
-
/** websocket连接成功回调 */
|
|
9
|
-
opened?: (event: any) => void
|
|
10
|
-
|
|
11
|
-
/** websocket关闭连接回调 */
|
|
12
|
-
close?: (event: any) => void
|
|
13
|
-
|
|
14
|
-
/** websocket接收到消息回调 */
|
|
15
|
-
message?: (event: any) => void
|
|
16
|
-
|
|
17
|
-
/** websocket连接异常回调 */
|
|
18
|
-
error?: (event: any) => void
|
|
19
|
-
|
|
20
|
-
/** 是否重连,默认开启 */
|
|
21
|
-
ifReconnect?: boolean
|
|
22
|
-
|
|
23
|
-
/** 连接close关闭时是否重连,默认关闭 */
|
|
24
|
-
reconnectWhenClose?: boolean
|
|
25
|
-
|
|
26
|
-
/** 重连次数,默认为3,-1 表示一直重连 */
|
|
27
|
-
reconnectNum?: number
|
|
28
|
-
}
|
|
1
|
+
export type socketConfig = {
|
|
2
|
+
/** 请求地址 */
|
|
3
|
+
url: string
|
|
4
|
+
|
|
5
|
+
/** 请求参数 */
|
|
6
|
+
params?: Record<string, any>
|
|
7
|
+
|
|
8
|
+
/** websocket连接成功回调 */
|
|
9
|
+
opened?: (event: any) => void
|
|
10
|
+
|
|
11
|
+
/** websocket关闭连接回调 */
|
|
12
|
+
close?: (event: any) => void
|
|
13
|
+
|
|
14
|
+
/** websocket接收到消息回调 */
|
|
15
|
+
message?: (event: any) => void
|
|
16
|
+
|
|
17
|
+
/** websocket连接异常回调 */
|
|
18
|
+
error?: (event: any) => void
|
|
19
|
+
|
|
20
|
+
/** 是否重连,默认开启 */
|
|
21
|
+
ifReconnect?: boolean
|
|
22
|
+
|
|
23
|
+
/** 连接close关闭时是否重连,默认关闭 */
|
|
24
|
+
reconnectWhenClose?: boolean
|
|
25
|
+
|
|
26
|
+
/** 重连次数,默认为3,-1 表示一直重连 */
|
|
27
|
+
reconnectNum?: number
|
|
28
|
+
}
|