@das-fed/web 6.4.0-dev.53 → 6.4.0-dev.54
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/{index-B-PNux9j.js → index-B8Aghk-h.js} +871 -864
- package/index-B8Aghk-h.js.gz +0 -0
- package/{packages/main-app-framework/index-Ds6w01_8.js → index-DthWf2Vh.js} +1 -1
- package/index-q2gw5DDJ.js +76 -0
- package/index-q2gw5DDJ.js.gz +0 -0
- package/index.js +6 -6
- package/package.json +6 -6
- package/packages/i18n/index.js +32 -32
- package/packages/i18n/index.js.gz +0 -0
- package/packages/main-app-framework/{index-NHFTE4a4.js → index-5s8nVJvZ.js} +385 -378
- package/packages/main-app-framework/index-5s8nVJvZ.js.gz +0 -0
- package/packages/main-app-framework/index-Dd_-Ntg9.js +76 -0
- package/packages/main-app-framework/index-Dd_-Ntg9.js.gz +0 -0
- package/{index-ClTFTm9G.js → packages/main-app-framework/index-YPpvGD1A.js} +1 -1
- package/packages/main-app-framework/index.js +1 -1
- package/packages/main-app-framework/style.css +1 -1
- package/packages/main-app-framework/style.css.gz +0 -0
- package/packages/micro-frontend/index.js.gz +0 -0
- package/style.css +1 -1
- package/style.css.gz +0 -0
- package/types/i18n/index.d.ts +2 -2
- package/index-B-PNux9j.js.gz +0 -0
- package/index-DXgo7XbS.js +0 -75
- package/index-DXgo7XbS.js.gz +0 -0
- package/packages/main-app-framework/index-DF9fUHIK.js +0 -75
- package/packages/main-app-framework/index-DF9fUHIK.js.gz +0 -0
- package/packages/main-app-framework/index-NHFTE4a4.js.gz +0 -0
|
Binary file
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { defineComponent as k, computed as p, withDirectives as v, openBlock as A, createBlock as U, unref as c, withCtx as C, createVNode as S, vShow as I } from "vue";
|
|
2
|
+
import { layoutData as j } from "@das-fed/web/packages/layout/index";
|
|
3
|
+
import { t as D } from "@das-fed/web/packages/i18n/index";
|
|
4
|
+
import { DasAppContainer as $ } from "@das-fed/ui/packages/business-components/app-container/index";
|
|
5
|
+
import { DasSpin as x } from "@das-fed/ui/packages/components/spin/index";
|
|
6
|
+
import { getTabInfo as T } from "@das-fed/utils/common-info";
|
|
7
|
+
import { setShowLayout as b } from "@das-fed/utils/common-tools";
|
|
8
|
+
import { createService as E } from "@das-fed/utils/create-api-service";
|
|
9
|
+
import { u as L, p as q, a as u, c as f, b as B, l as P, d as K } from "./index-B8Aghk-h.js";
|
|
10
|
+
const M = "v1", N = E(`/api/justauth/client/${M}`), O = N.get("/visitor/kingdee/auth/user/auth_code"), Z = /* @__PURE__ */ k({
|
|
11
|
+
__name: "index",
|
|
12
|
+
setup(V) {
|
|
13
|
+
const { beforeEntryApp: d, entryApp: m } = L(), h = p(() => q.value.skinStyle), g = p(() => !!j.menu.items.length), w = p(() => {
|
|
14
|
+
if (!u.value || !u.value.length) return [];
|
|
15
|
+
const o = f(u.value);
|
|
16
|
+
return Array.isArray(o) ? o.length ? (o.forEach((n) => n.apps = y(n.apps, 4)), o) : [] : [];
|
|
17
|
+
}), y = (o, n) => {
|
|
18
|
+
const e = [];
|
|
19
|
+
for (let r = 0; r < o.length; r += n)
|
|
20
|
+
e.push(o.slice(r, r + n));
|
|
21
|
+
return e;
|
|
22
|
+
}, _ = async (o) => {
|
|
23
|
+
if (!o) return;
|
|
24
|
+
if (!sessionStorage.getItem("projectInfo")) {
|
|
25
|
+
window.confirm(D("系统资源更新,请刷新系统")) && (window.__isAutoCloseApp = !1, window.location.reload());
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const e = f(o);
|
|
29
|
+
if (P.innerSet = !0, e.routeUrl) {
|
|
30
|
+
if (o.code === "Ioc") {
|
|
31
|
+
window.open(e.routeUrl, "_blank");
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if (o.code === "wojiacloud") {
|
|
35
|
+
const t = sessionStorage.getItem("kingdee_token") || "";
|
|
36
|
+
if (t) {
|
|
37
|
+
const [i, a] = await O().run({ accessToken: t });
|
|
38
|
+
if (a) {
|
|
39
|
+
const s = (a == null ? void 0 : a.auth_code) ?? "";
|
|
40
|
+
e.routeUrl = e.routeUrl.includes("?") ? `${e.routeUrl}&code=${s}` : `${e.routeUrl}?code=${s}`;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const r = (o == null ? void 0 : o.openType) ?? 1, l = (o == null ? void 0 : o.type) ?? 1;
|
|
46
|
+
if (r === 1) {
|
|
47
|
+
if (!await d(o)) return;
|
|
48
|
+
const i = T().preTab[o.code], a = (i == null ? void 0 : i.code) ?? "", s = { ...(i == null ? void 0 : i.query) ?? {} };
|
|
49
|
+
m({ microApp: e, menuCode: a, route: { query: s } });
|
|
50
|
+
}
|
|
51
|
+
if (r === 2 && e.routeUrl) {
|
|
52
|
+
let t = "";
|
|
53
|
+
l === 1 ? (t = e != null && e.applicationPath ? location.origin + "/" + e.applicationPath + e.routeUrl : location.origin + e.routeUrl, t = b(t)) : l === 2 && (t = K(e.routeUrl)), window.open(t, "_blank");
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
return (o, n) => v((A(), U(c(x), {
|
|
57
|
+
full: "",
|
|
58
|
+
spinning: c(B)
|
|
59
|
+
}, {
|
|
60
|
+
default: C(() => [
|
|
61
|
+
S(c($), {
|
|
62
|
+
theme: h.value,
|
|
63
|
+
appCategorys: w.value,
|
|
64
|
+
onOpenApp: _
|
|
65
|
+
}, null, 8, ["theme", "appCategorys"])
|
|
66
|
+
]),
|
|
67
|
+
_: 1
|
|
68
|
+
/* STABLE */
|
|
69
|
+
}, 8, ["spinning"])), [
|
|
70
|
+
[I, !g.value]
|
|
71
|
+
]);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
export {
|
|
75
|
+
Z as default
|
|
76
|
+
};
|
|
Binary file
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as s, y as t, A as n, z as i, B as r, e as u, k as o, r as p, g, j as m, q as l, w as D, x as b, f as h, i as A, E as L, F as T, n as c, C as y, D as R, I as W, G as I, s as M, h as F, m as V, o as f, v as k, t as v } from "./index-B8Aghk-h.js";
|
|
2
2
|
export {
|
|
3
3
|
s as DasMainAppLayout,
|
|
4
4
|
t as DasWebLayout,
|
|
@@ -6,8 +6,8 @@ export {
|
|
|
6
6
|
i as DasWebNav,
|
|
7
7
|
r as DasWebTabs,
|
|
8
8
|
u as createDasWebApp,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
o as currentLang,
|
|
10
|
+
p as currentTheme,
|
|
11
11
|
g as getI18nRule,
|
|
12
12
|
m as getLang,
|
|
13
13
|
l as getThemeRule,
|
|
@@ -21,9 +21,9 @@ export {
|
|
|
21
21
|
y as layout,
|
|
22
22
|
R as layoutData,
|
|
23
23
|
W as mainAppFramework,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
I as microFrontend,
|
|
25
|
+
M as setI18nRule,
|
|
26
|
+
F as setLang,
|
|
27
27
|
V as setLangRule,
|
|
28
28
|
f as setTheme,
|
|
29
29
|
k as setThemeRule,
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/web",
|
|
3
|
-
"version": "6.4.0-dev.
|
|
3
|
+
"version": "6.4.0-dev.54",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@das-fed/ui": "6.4.0-dev.
|
|
8
|
-
"@das-fed/utils": "6.4.0-dev.
|
|
9
|
-
"@das-fed/web": "6.4.0-dev.
|
|
10
|
-
"@das-fed/web-components": "6.4.0-dev.
|
|
7
|
+
"@das-fed/ui": "6.4.0-dev.54",
|
|
8
|
+
"@das-fed/utils": "6.4.0-dev.54",
|
|
9
|
+
"@das-fed/web": "6.4.0-dev.54",
|
|
10
|
+
"@das-fed/web-components": "6.4.0-dev.54",
|
|
11
11
|
"@microsoft/signalr": "^8.0.7",
|
|
12
12
|
"@vueuse/core": "^9.13.0",
|
|
13
13
|
"animate.css": "^4.1.1",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"vue-router": "^4.4.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@das-fed/cli": "6.4.0-dev.
|
|
21
|
+
"@das-fed/cli": "6.4.0-dev.54",
|
|
22
22
|
"@types/lodash": "^4.14.194",
|
|
23
23
|
"@types/lodash-es": "^4.17.12",
|
|
24
24
|
"@vitejs/plugin-vue": "^5.1.0",
|
package/packages/i18n/index.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { reactive as u, ref as
|
|
2
|
-
const a = u({}),
|
|
3
|
-
const
|
|
4
|
-
for (const o in n)
|
|
5
|
-
t && (i[o] = n[o]), s && (a[o] = n[o]);
|
|
6
|
-
}, z = (n, l, t) => {
|
|
7
|
-
const s = t === "global", o = !s;
|
|
1
|
+
import { reactive as u, ref as b, computed as f } from "vue";
|
|
2
|
+
const a = u({}), c = u({}), i = b("zh-CN"), m = "dasI18n", I = (n = {}, o = "zh-CN", t = "global") => {
|
|
3
|
+
const l = t === "global", s = !l;
|
|
8
4
|
for (const e in n)
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
5
|
+
l && (c[e][o] = n[e]), s && (a[e][o] = n[e]);
|
|
6
|
+
}, r = (n = {}, o = "global") => {
|
|
7
|
+
const t = o === "global", l = !t;
|
|
8
|
+
for (const s in n)
|
|
9
|
+
t && !c[s] && (c[s] = n[s]), l && !a[s] && (a[s] = n[s]);
|
|
10
|
+
}, v = async (n) => {
|
|
11
|
+
var l, s;
|
|
12
|
+
const o = window[m];
|
|
13
|
+
o && r(o, "global");
|
|
14
|
+
let t = Object.assign(((l = n == null ? void 0 : n.i18n) == null ? void 0 : l.glob) || {});
|
|
15
|
+
(s = n == null ? void 0 : n.microApps) == null || s.map((e) => {
|
|
16
|
+
var g;
|
|
17
|
+
t = Object.assign(t, ((g = e.i18n) == null ? void 0 : g.glob) || {});
|
|
18
|
+
}), Object.values(t).filter((e) => !!e).flat().map((e) => r(e));
|
|
19
|
+
}, h = (n, ...o) => f(() => {
|
|
20
|
+
let t = c[n] || a[n] || n;
|
|
21
21
|
if (t === n) return n;
|
|
22
22
|
typeof t == "string" && (t = { "zh-CN": t });
|
|
23
|
-
let
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
}),
|
|
27
|
-
}),
|
|
28
|
-
|
|
29
|
-
}, N = () =>
|
|
23
|
+
let l = t[i.value];
|
|
24
|
+
return i.value === "zh-CN" && t["zh-cn"] && !t["zh-CN"] && (l = t["zh-cn"]), o.map((s, e) => {
|
|
25
|
+
l = l.replace(`$${e}`, s);
|
|
26
|
+
}), l;
|
|
27
|
+
}), z = h, L = (n, ...o) => z(n, ...o).value, D = (n) => {
|
|
28
|
+
i.value = n;
|
|
29
|
+
}, N = () => i;
|
|
30
30
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
i as currentLang,
|
|
32
|
+
h as getI18nRule,
|
|
33
33
|
N as getLang,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
z as i18n,
|
|
35
|
+
v as initI18n,
|
|
36
|
+
r as setI18nRule,
|
|
37
37
|
D as setLang,
|
|
38
|
-
|
|
38
|
+
I as setLangRule,
|
|
39
39
|
L as t
|
|
40
40
|
};
|
|
Binary file
|