@das-fed/upf-utils 6.4.0-dev.124
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/__VLS_types.d.ts +124 -0
- package/api-services/i18n/index.d.ts +53 -0
- package/api-services/i18n/index.js +27 -0
- package/api-services/i18n/index.js.gz +0 -0
- package/api-services/index.d.ts +2 -0
- package/api-services/index.js +3141 -0
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.d.ts +2 -0
- package/api-services/modules/app-manage/index.js +2827 -0
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.d.ts +2 -0
- package/api-services/modules/authentication/index.js +2827 -0
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.d.ts +6 -0
- package/api-services/modules/bems/index.js +2831 -0
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.d.ts +2 -0
- package/api-services/modules/contract/index.js +2827 -0
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.d.ts +7 -0
- package/api-services/modules/duty-manage/index.js +2836 -0
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.d.ts +2 -0
- package/api-services/modules/enterpriseright/index.js +2827 -0
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.d.ts +37 -0
- package/api-services/modules/file/index.js +3059 -0
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.d.ts +2 -0
- package/api-services/modules/gateway-edge/index.js +2827 -0
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.d.ts +21 -0
- package/api-services/modules/index.js +3115 -0
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.d.ts +16 -0
- package/api-services/modules/iot/index.js +2841 -0
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.d.ts +3 -0
- package/api-services/modules/justauth/index.js +2828 -0
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.d.ts +2 -0
- package/api-services/modules/knowledge/index.js +2827 -0
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.d.ts +2 -0
- package/api-services/modules/link/index.js +2827 -0
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.d.ts +2 -0
- package/api-services/modules/permission/index.js +2827 -0
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.d.ts +14 -0
- package/api-services/modules/platformManage/index.js +2835 -0
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.d.ts +2 -0
- package/api-services/modules/portal/index.js +2827 -0
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.d.ts +2 -0
- package/api-services/modules/space-manage/index.js +2827 -0
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.d.ts +8 -0
- package/api-services/modules/super-admin/index.js +2830 -0
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.d.ts +6 -0
- package/api-services/modules/supplier/index.js +2829 -0
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.d.ts +2 -0
- package/api-services/modules/supplychain-manage/index.js +2827 -0
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.d.ts +2 -0
- package/api-services/modules/systemConfiguration/index.js +2827 -0
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.d.ts +2 -0
- package/api-services/modules/tool/index.js +2827 -0
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.d.ts +1 -0
- package/api-services/src/create-service/index.js +2827 -0
- package/api-services/src/create-service/index.js.gz +0 -0
- package/atob/index.d.ts +2 -0
- package/atob/index.js +11 -0
- package/common-info/getIframeUrl/index.d.ts +9 -0
- package/common-info/getIframeUrl/index.js +10 -0
- package/common-info/getInfoFromUrl/index.d.ts +8 -0
- package/common-info/getInfoFromUrl/index.js +84 -0
- package/common-info/getInfoFromUrl/index.js.gz +0 -0
- package/common-info/index.d.ts +61 -0
- package/common-info/index.js +171 -0
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/index.d.ts +5 -0
- package/common-info/set-personal-info/index.js +1474 -0
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-info/type.d.ts +214 -0
- package/common-tools/arr-tools/index.d.ts +15 -0
- package/common-tools/arr-tools/index.js +8 -0
- package/common-tools/calc-text-width/index.d.ts +1 -0
- package/common-tools/calc-text-width/index.js +10 -0
- package/common-tools/date-format/index.d.ts +7 -0
- package/common-tools/date-format/index.js +19 -0
- package/common-tools/extract-file-name/index.d.ts +1 -0
- package/common-tools/extract-file-name/index.js +1466 -0
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/common-tools/get-file-extension/index.d.ts +6 -0
- package/common-tools/get-file-extension/index.js +7 -0
- package/common-tools/get-url-params/index.d.ts +46 -0
- package/common-tools/get-url-params/index.js +63 -0
- package/common-tools/get-url-params/index.js.gz +0 -0
- package/common-tools/handle-data/index.d.ts +6 -0
- package/common-tools/handle-data/index.js +4 -0
- package/common-tools/index.d.ts +14 -0
- package/common-tools/index.js +14 -0
- package/common-tools/nest-tree-format/index.d.ts +30 -0
- package/common-tools/nest-tree-format/index.js +24 -0
- package/common-tools/obj-tools/index.d.ts +7 -0
- package/common-tools/obj-tools/index.js +14 -0
- package/common-tools/platform-tools/index.d.ts +19 -0
- package/common-tools/platform-tools/index.js +19 -0
- package/common-tools/queue-promise/index.d.ts +6 -0
- package/common-tools/queue-promise/index.js +9 -0
- package/common-tools/setHtmlMinWH/index.d.ts +5 -0
- package/common-tools/setHtmlMinWH/index.js +7 -0
- package/common-tools/update-browser-title/index.d.ts +1 -0
- package/common-tools/update-browser-title/index.js +12 -0
- package/common-tools/update-fav-icon/index.d.ts +11 -0
- package/common-tools/update-fav-icon/index.js +22 -0
- package/config/index.d.ts +2 -0
- package/config/index.js +9 -0
- package/create-api-service/i18n/index.d.ts +33 -0
- package/create-api-service/i18n/index.js +15 -0
- package/create-api-service/index.d.ts +3 -0
- package/create-api-service/index.js +2827 -0
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/proxy-sso/index.d.ts +3 -0
- package/create-api-service/proxy-sso/index.js +21 -0
- package/create-api-service/sso/index.d.ts +21 -0
- package/create-api-service/sso/index.js +1845 -0
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/index.d.ts +12 -0
- package/curring-http/index.js +2002 -0
- package/curring-http/index.js.gz +0 -0
- package/curring-http/type.d.ts +89 -0
- package/dimple-canvas/index.d.ts +3 -0
- package/dimple-canvas/index.js +5 -0
- package/directive/auth/index.d.ts +8 -0
- package/directive/auth/index.js +62 -0
- package/directive/auth/index.js.gz +0 -0
- package/directive/clickOutside/index.d.ts +6 -0
- package/directive/clickOutside/index.js +27 -0
- package/directive/hoverInside/index.d.ts +6 -0
- package/directive/hoverInside/index.js +21 -0
- package/directive/index.d.ts +3 -0
- package/directive/index.js +8 -0
- package/directive/utils/index.d.ts +7 -0
- package/directive/utils/index.js +7 -0
- package/dom-check-in/index.d.ts +6 -0
- package/dom-check-in/index.js +8 -0
- package/dom-watcher/index.d.ts +25 -0
- package/dom-watcher/index.js +9 -0
- package/esm-map.json +146 -0
- package/hooks/popup-manager/use-zindex/index.d.ts +3 -0
- package/hooks/popup-manager/use-zindex/index.js +9 -0
- package/hooks/use-get-auth/apis.d.ts +4 -0
- package/hooks/use-get-auth/index.d.ts +9 -0
- package/hooks/use-get-auth/index.js +53 -0
- package/hooks/use-get-auth/index.js.gz +0 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/load-js/index.d.ts +3 -0
- package/load-js/index.js +12 -0
- package/nextTiken/index.d.ts +12 -0
- package/nextTiken/index.js +45 -0
- package/nextTiken/index.js.gz +0 -0
- package/oss/index.d.ts +2 -0
- package/oss/index.js +11 -0
- package/package.json +49 -0
- package/pinyin-first-character/index.d.ts +2 -0
- package/pinyin-first-character/index.js +25022 -0
- package/pinyin-first-character/index.js.gz +0 -0
- package/process-engine-info/index.d.ts +13 -0
- package/process-engine-info/index.js +15 -0
- package/pure-image-src/index.d.ts +2 -0
- package/pure-image-src/index.js +4 -0
- package/size-watcher/index.d.ts +6 -0
- package/size-watcher/index.js +20 -0
- package/style/index.d.ts +2 -0
- package/style/index.js +70 -0
- package/style/index.js.gz +0 -0
- package/style/math.d.ts +9 -0
- package/style/style.d.ts +31 -0
- package/token-tools/index.d.ts +21 -0
- package/token-tools/index.js +11 -0
- package/use-low-code/index.d.ts +1 -0
- package/use-low-code/index.js +69 -0
- package/use-low-code/index.js.gz +0 -0
- package/use-low-code/low-code-iframe.vue.d.ts +2 -0
- package/use-low-code/style.css +1 -0
- package/vue/hooks/use-model-value/index.d.ts +9 -0
- package/vue/hooks/use-model-value/index.js +10 -0
- package/vue/index.d.ts +1 -0
- package/vue/index.js +4 -0
- package/webSocket-service/index.d.ts +41 -0
- package/webSocket-service/index.js +83 -0
- package/webSocket-service/index.js.gz +0 -0
- package/webSocket-service/type.d.ts +28 -0
- package/with-install/index.d.ts +11 -0
- package/with-install/index.js +6 -0
|
Binary file
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取url中的参数
|
|
3
|
+
* @param url url地址
|
|
4
|
+
* @param queryName 参数名称,不传则返回参数集合
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export declare const getUrlParams: (allUrl?: string, queryName?: string) => any;
|
|
8
|
+
/**
|
|
9
|
+
* 拼接完整的url
|
|
10
|
+
* @param url pathname
|
|
11
|
+
* @param queryObj 参数集合
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export declare const getFullPath: (url: string, queryObj?: any) => string;
|
|
15
|
+
/**
|
|
16
|
+
* 删除url中指定的参数,并返回最终的url
|
|
17
|
+
* @param queryNames 数组,需要删除的参数名集合
|
|
18
|
+
* @param url 指定url
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
export declare const funcUrlDel: (queryNames: string[], url?: string) => string;
|
|
22
|
+
/**
|
|
23
|
+
* 将url中的query参数转换成对象
|
|
24
|
+
* @param url url链接,域名可带可不带
|
|
25
|
+
* @returns params url链接参数转化的Object
|
|
26
|
+
*/
|
|
27
|
+
export declare const urlParamsToObject: (url: string) => any;
|
|
28
|
+
/**
|
|
29
|
+
* 将对象转换成url中的query参数
|
|
30
|
+
* @param params 参数对象
|
|
31
|
+
* @returns url形式的参数
|
|
32
|
+
*/
|
|
33
|
+
export declare const objectToUrlparams: (params: any) => string;
|
|
34
|
+
/**
|
|
35
|
+
* 给url拼接params参数
|
|
36
|
+
* @param url 路径
|
|
37
|
+
* @param pathParams 参数,数组格式
|
|
38
|
+
* @returns
|
|
39
|
+
*/
|
|
40
|
+
export declare const addPathParamsToUrl: (url: string, pathParams: string[]) => any;
|
|
41
|
+
/**
|
|
42
|
+
* 从URL中获取origin
|
|
43
|
+
* @param url url
|
|
44
|
+
* @returns origin
|
|
45
|
+
*/
|
|
46
|
+
export declare function getOriginFromUrl(url: string): any;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
const i = (n, s) => {
|
|
2
|
+
let e = window.location.search || "";
|
|
3
|
+
if (n && n !== location.href) {
|
|
4
|
+
const t = n.indexOf("?");
|
|
5
|
+
t !== -1 ? e = n.slice(t) : e = "";
|
|
6
|
+
}
|
|
7
|
+
const r = new URLSearchParams(e);
|
|
8
|
+
if (s)
|
|
9
|
+
return r.get(s);
|
|
10
|
+
{
|
|
11
|
+
let t = {};
|
|
12
|
+
for (let [o, l] of r.entries())
|
|
13
|
+
t[o] = l;
|
|
14
|
+
return t;
|
|
15
|
+
}
|
|
16
|
+
}, f = (n, s = {}) => {
|
|
17
|
+
let e = "", r = "";
|
|
18
|
+
const t = Object.keys(s);
|
|
19
|
+
return t && t.length && t.forEach((o, l) => {
|
|
20
|
+
l === t.length - 1 ? r += `${o}=${s[o]}` : r += `${o}=${s[o]}&`;
|
|
21
|
+
}), r ? e = location.origin + n + `?${r}` : e = location.origin + n, e;
|
|
22
|
+
}, h = (n, s) => {
|
|
23
|
+
const e = s || location.href, r = i(e), t = Object.keys(r) || [];
|
|
24
|
+
if (!t || !t.length) return e.includes("?") ? e.split("?")[0] : e.split("&")[0];
|
|
25
|
+
let o = t.filter((a) => !n.includes(a));
|
|
26
|
+
if (!o || !o.length) return e.includes("?") ? e.split("?")[0] : e.split("&")[0];
|
|
27
|
+
let l = "";
|
|
28
|
+
return o.forEach((a, c) => {
|
|
29
|
+
c === t.length - 1 ? l += `${a}=${r[a]}` : l += `${a}=${r[a]}&`;
|
|
30
|
+
}), e.includes("?") ? e.split("?")[0] + `?${l}` : e.split("&")[0] + `?${l}`;
|
|
31
|
+
}, u = (n) => {
|
|
32
|
+
const s = new URLSearchParams(n.split("?")[1]), e = {};
|
|
33
|
+
for (const [r, t] of s)
|
|
34
|
+
e.hasOwnProperty(r) ? Array.isArray(e[r]) ? e[r].push(t) : e[r] = [e[r], t] : e[r] = t;
|
|
35
|
+
return e;
|
|
36
|
+
}, g = (n) => {
|
|
37
|
+
let s = "";
|
|
38
|
+
const e = Object.keys(n);
|
|
39
|
+
return e && e.length && e.forEach((r, t) => {
|
|
40
|
+
t === e.length - 1 ? s += `${r}=${n[r]}` : s += `${r}=${n[r]}&`;
|
|
41
|
+
}), s;
|
|
42
|
+
}, p = (n, s) => {
|
|
43
|
+
const e = new URL(n, location.origin);
|
|
44
|
+
let { origin: r, pathname: t } = e;
|
|
45
|
+
t === "/" && (t = ""), s.map((l) => t += `/${l}`);
|
|
46
|
+
const o = new URL(`${r}${t}`);
|
|
47
|
+
return e.searchParams.forEach((l, a) => {
|
|
48
|
+
o.searchParams.append(a, l);
|
|
49
|
+
}), o.toString();
|
|
50
|
+
};
|
|
51
|
+
function $(n) {
|
|
52
|
+
const s = /^(https?:\/\/[^/]+)/, e = n.match(s);
|
|
53
|
+
return e && e.length > 1 ? e[1] : null;
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
p as addPathParamsToUrl,
|
|
57
|
+
h as funcUrlDel,
|
|
58
|
+
f as getFullPath,
|
|
59
|
+
$ as getOriginFromUrl,
|
|
60
|
+
i as getUrlParams,
|
|
61
|
+
g as objectToUrlparams,
|
|
62
|
+
u as urlParamsToObject
|
|
63
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from '@das-fed/upf-utils/common-tools/date-format';
|
|
2
|
+
export * from '@das-fed/upf-utils/common-tools/get-url-params';
|
|
3
|
+
export * from '@das-fed/upf-utils/common-tools/nest-tree-format';
|
|
4
|
+
export * from '@das-fed/upf-utils/common-tools/obj-tools';
|
|
5
|
+
export * from '@das-fed/upf-utils/common-tools/arr-tools';
|
|
6
|
+
export * from '@das-fed/upf-utils/common-tools/handle-data';
|
|
7
|
+
export * from '@das-fed/upf-utils/common-tools/setHtmlMinWH';
|
|
8
|
+
export * from '@das-fed/upf-utils/common-tools/queue-promise';
|
|
9
|
+
export * from '@das-fed/upf-utils/common-tools/platform-tools';
|
|
10
|
+
export * from '@das-fed/upf-utils/common-tools/update-fav-icon';
|
|
11
|
+
export * from '@das-fed/upf-utils/common-tools/update-browser-title';
|
|
12
|
+
export * from '@das-fed/upf-utils/common-tools/extract-file-name';
|
|
13
|
+
export * from '@das-fed/upf-utils/common-tools/get-file-extension';
|
|
14
|
+
export * from '@das-fed/upf-utils/common-tools/calc-text-width';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from "@das-fed/upf-utils/common-tools/date-format";
|
|
2
|
+
export * from "@das-fed/upf-utils/common-tools/get-url-params";
|
|
3
|
+
export * from "@das-fed/upf-utils/common-tools/nest-tree-format";
|
|
4
|
+
export * from "@das-fed/upf-utils/common-tools/obj-tools";
|
|
5
|
+
export * from "@das-fed/upf-utils/common-tools/arr-tools";
|
|
6
|
+
export * from "@das-fed/upf-utils/common-tools/handle-data";
|
|
7
|
+
export * from "@das-fed/upf-utils/common-tools/setHtmlMinWH";
|
|
8
|
+
export * from "@das-fed/upf-utils/common-tools/queue-promise";
|
|
9
|
+
export * from "@das-fed/upf-utils/common-tools/platform-tools";
|
|
10
|
+
export * from "@das-fed/upf-utils/common-tools/update-fav-icon";
|
|
11
|
+
export * from "@das-fed/upf-utils/common-tools/update-browser-title";
|
|
12
|
+
export * from "@das-fed/upf-utils/common-tools/extract-file-name";
|
|
13
|
+
export * from "@das-fed/upf-utils/common-tools/get-file-extension";
|
|
14
|
+
export * from "@das-fed/upf-utils/common-tools/calc-text-width";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 过滤掉叶子节点,返回嵌套数组
|
|
3
|
+
* @param arr 要过滤的树
|
|
4
|
+
* @param children 子节点指定字段名,默认‘children’
|
|
5
|
+
* @returns 返回过滤掉叶子节点的嵌套数组
|
|
6
|
+
*/
|
|
7
|
+
export declare const findNonEmptyChildrenItems: (arr: any[], children?: string) => any[];
|
|
8
|
+
/**
|
|
9
|
+
* 树形数组转扁平数组
|
|
10
|
+
* @param list 要拍平的树
|
|
11
|
+
* @param child 子节点指定字段名,默认‘children’
|
|
12
|
+
* @param deleteChild 是否删除children字段,默认为true
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare const flatTree: (list: any[], child?: string, deleteChild?: boolean) => any[];
|
|
16
|
+
/**
|
|
17
|
+
* 根据条件过滤节点
|
|
18
|
+
* @param tree 要过滤的树
|
|
19
|
+
* @param predicate 过滤条件,符合条件的节点保留
|
|
20
|
+
* @param children 子节点指定字段名,默认‘children’
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
export declare const filterTreeArray: (tree: any[], predicate: (node: any) => boolean, children?: string) => any;
|
|
24
|
+
/**
|
|
25
|
+
* 树结构查找节点,深度优先
|
|
26
|
+
* @param tree 要过滤的树
|
|
27
|
+
* @param func 过滤条件,符合条件的节点保留(参数为函数,返回值为布尔值)
|
|
28
|
+
* @returns 查找到的节点
|
|
29
|
+
*/
|
|
30
|
+
export declare const treeFind: (tree: any[], func: (node: any) => boolean, children?: string) => any;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const s = (n, t = "children") => {
|
|
2
|
+
let r = [];
|
|
3
|
+
for (let e = 0; e < n.length; e++)
|
|
4
|
+
n[e][t] && n[e][t].length > 0 && (r.push(n[e]), r = r.concat(s(n[e][t])));
|
|
5
|
+
return r;
|
|
6
|
+
}, l = (n, t = "children", r = !0) => Array.isArray(n) && n.length ? n.reduce((e, u) => {
|
|
7
|
+
let f = u[t], o = { ...u };
|
|
8
|
+
return r && delete o[t], f && f.length ? e.concat(o, l(f, t, r)) : e.concat(o);
|
|
9
|
+
}, []) : [], c = (n, t, r = "children") => n.filter((e) => t(e)).map((e) => (e = Object.assign({}, e), e[r] && (e[r] = c(e[r], t)), e)), g = (n, t, r = "children") => {
|
|
10
|
+
for (const e of n) {
|
|
11
|
+
if (t(e)) return e;
|
|
12
|
+
if (e != null && e[r] && e[r].length) {
|
|
13
|
+
const u = g(e[r], t, r = "children");
|
|
14
|
+
if (u) return u;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return null;
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
c as filterTreeArray,
|
|
21
|
+
s as findNonEmptyChildrenItems,
|
|
22
|
+
l as flatTree,
|
|
23
|
+
g as treeFind
|
|
24
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const f = (t, r) => {
|
|
2
|
+
if (!t || !r || Object.keys(t).length !== Object.keys(r).length) return !1;
|
|
3
|
+
for (let e in t) {
|
|
4
|
+
if (r[e] === void 0) return !1;
|
|
5
|
+
if (typeof r[e] == "function" || typeof t[e] == "function") throw new Error("type error");
|
|
6
|
+
if (typeof r[e] != typeof t[e]) return !1;
|
|
7
|
+
if (typeof t[e] == "object") return f(t[e], r[e]);
|
|
8
|
+
if (t[e] !== r[e]) return !1;
|
|
9
|
+
}
|
|
10
|
+
return !0;
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
f as objEqual
|
|
14
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 判断一个 URL 路径是否是相对路径或者同域名
|
|
3
|
+
* @param url
|
|
4
|
+
* @returns
|
|
5
|
+
*/
|
|
6
|
+
export declare const isRelativeOrSameDomain: (url: string) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* 自动拼接上showLayout=false参数
|
|
9
|
+
* @param url
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
export declare const setShowLayout: (url: string) => string;
|
|
13
|
+
export declare const setShowWatermark: (url: string) => string;
|
|
14
|
+
/**
|
|
15
|
+
* url携带token
|
|
16
|
+
* @param url
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
export declare const withToken: (url: string) => string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { getToken as s } from "@das-fed/upf-utils/common-info";
|
|
2
|
+
const o = (e) => !!(!e.startsWith("http") || e.startsWith(location.origin)), n = (e) => {
|
|
3
|
+
if (!e) return "";
|
|
4
|
+
let t = e;
|
|
5
|
+
return o(e) && !e.includes("showLayout=false") && (t = e.indexOf("?") !== -1 ? e + "&showLayout=false" : e + "?showLayout=false"), t;
|
|
6
|
+
}, i = (e) => {
|
|
7
|
+
if (!e) return "";
|
|
8
|
+
let t = "";
|
|
9
|
+
return o(e) && !e.includes("showWatermark=false") ? t = e.indexOf("?") !== -1 ? e + "&showWatermark=false" : e + "?showWatermark=false" : t = e, t;
|
|
10
|
+
}, r = (e) => {
|
|
11
|
+
const t = s();
|
|
12
|
+
return e.includes("?") ? `${e}&token=${t}` : `${e}?token=${t}`;
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
o as isRelativeOrSameDomain,
|
|
16
|
+
n as setShowLayout,
|
|
17
|
+
i as setShowWatermark,
|
|
18
|
+
r as withToken
|
|
19
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const m = (e) => {
|
|
2
|
+
let i = "1366px", n = "528px";
|
|
3
|
+
e != null && e.minWidth && (i = e.minWidth), e != null && e.minHeight && (n = e.minHeight), document.documentElement.style.minWidth = i, document.documentElement.style.minHeight = n, document.documentElement.style.overflow = "auto";
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
m as setHtmlMinWH
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const setBrowseTitle: (defaultTitle?: string) => any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { systemConfiguration as l } from "@das-fed/upf-utils/api-services/modules";
|
|
2
|
+
const n = async (o = "AIoT智能物联网管控平台") => {
|
|
3
|
+
let t = localStorage.getItem("browser-title") ?? "";
|
|
4
|
+
if (!t) {
|
|
5
|
+
const i = l.get("/visitor/appearance/with-default", (r) => (r.public = !0, r)), [s, e] = await i().run();
|
|
6
|
+
e != null && e.browserTitle && (t = e.browserTitle);
|
|
7
|
+
}
|
|
8
|
+
document.title = t || o;
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
n as setBrowseTitle
|
|
12
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 设置平台的favIcon
|
|
3
|
+
* @param favIcon 图标
|
|
4
|
+
* @param defaultIcon 默认图标
|
|
5
|
+
*/
|
|
6
|
+
export declare const updateFavIcon: (favIcon: string, defaultIcon?: string) => void;
|
|
7
|
+
/**
|
|
8
|
+
* 设置平台的favIcon,如果localStorage中没有则调用接口获取
|
|
9
|
+
* @param defaultIcon 默认图标
|
|
10
|
+
*/
|
|
11
|
+
export declare const setDasHtmlIcon: (defaultIcon?: string) => any;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getFavIcon as l } from "@das-fed/upf-utils/common-info";
|
|
2
|
+
import { pureImageSrc as m } from "@das-fed/upf-utils/pure-image-src";
|
|
3
|
+
import { systemConfiguration as c } from "@das-fed/upf-utils/api-services";
|
|
4
|
+
const i = (o, r = "./logo.svg") => {
|
|
5
|
+
const t = o || r;
|
|
6
|
+
let e = document.querySelector('link[rel*="icon"]');
|
|
7
|
+
e ? e == null || e.setAttribute("href", t) : (e = document.createElement("link"), e.rel = "icon", e.type = "image/svg+xml", e.href = t, document.getElementsByTagName("head")[0].appendChild(e));
|
|
8
|
+
}, f = async (o = "./logo.svg") => {
|
|
9
|
+
const r = c.get("/visitor/appearance/with-default", (e) => (e.public = !0, e));
|
|
10
|
+
let t = l();
|
|
11
|
+
if (!t) {
|
|
12
|
+
const [e, n] = await r().run();
|
|
13
|
+
if (e) return;
|
|
14
|
+
const { browserLogoImgHost: s = "", browserLogoImg: a = "" } = n || {};
|
|
15
|
+
t = a ? s + m(a) : "";
|
|
16
|
+
}
|
|
17
|
+
i(t, o);
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
f as setDasHtmlIcon,
|
|
21
|
+
i as updateFavIcon
|
|
22
|
+
};
|
package/config/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const n = () => {
|
|
2
|
+
let s = { ...(window == null ? void 0 : window.config) || {} };
|
|
3
|
+
s.rootContainer || (s.rootContainer = "#app"), s.baseURL || (s.baseURL = location.origin), s.ossBaseURL || (s.ossBaseURL = "/oss"), s.ossBaseURL.startsWith("/") && (s.ossBaseURL = `${s.baseURL}/oss`), s.ssoBaseURL || (s.ssoBaseURL = s.baseURL);
|
|
4
|
+
let { microAppName: i, publicPath: o, mainAppName: e } = s;
|
|
5
|
+
return i && !0 && !o && (o = `/${i}/`.replace(/\/\//g, "/")), o || (o = "/"), s.publicPath = o, s.autoOssBucket || (s.autoOssBucket = e || i), s;
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
n as getConfig
|
|
9
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
参数校验错误: {
|
|
3
|
+
'zh-CN': string;
|
|
4
|
+
en: string;
|
|
5
|
+
_appCode: string;
|
|
6
|
+
};
|
|
7
|
+
接口地址未找到: {
|
|
8
|
+
'zh-CN': string;
|
|
9
|
+
en: string;
|
|
10
|
+
_appCode: string;
|
|
11
|
+
};
|
|
12
|
+
服务器内部错误: {
|
|
13
|
+
'zh-CN': string;
|
|
14
|
+
en: string;
|
|
15
|
+
_appCode: string;
|
|
16
|
+
};
|
|
17
|
+
解析错误: {
|
|
18
|
+
'zh-CN': string;
|
|
19
|
+
en: string;
|
|
20
|
+
_appCode: string;
|
|
21
|
+
};
|
|
22
|
+
请求配置异常: {
|
|
23
|
+
'zh-CN': string;
|
|
24
|
+
en: string;
|
|
25
|
+
_appCode: string;
|
|
26
|
+
};
|
|
27
|
+
'\u7F51\u7EDC\u5F02\u5E38\uFF0C\u8BF7\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u60C5\u51B5': {
|
|
28
|
+
'zh-CN': string;
|
|
29
|
+
en: string;
|
|
30
|
+
_appCode: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const r = {
|
|
2
|
+
参数校验错误: { "zh-CN": "参数校验错误", en: "Parameter Validation Error", _appCode: "framework" },
|
|
3
|
+
接口地址未找到: { "zh-CN": "接口地址未找到", en: "Api endpoint not found", _appCode: "framework" },
|
|
4
|
+
服务器内部错误: { "zh-CN": "服务器内部错误", en: "Internal Server Error", _appCode: "framework" },
|
|
5
|
+
解析错误: { "zh-CN": "解析错误", en: "Parsing Error", _appCode: "framework" },
|
|
6
|
+
请求配置异常: { "zh-CN": "请求配置异常", en: "Request Configuration Error", _appCode: "framework" },
|
|
7
|
+
"网络异常,请检查您的网络情况": {
|
|
8
|
+
"zh-CN": "网络异常,请检查您的网络情况",
|
|
9
|
+
en: "Network error, please check your network status",
|
|
10
|
+
_appCode: "framework"
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
r as default
|
|
15
|
+
};
|