@das-fed/upf-web 6.4.0-dev.214 → 6.4.0-dev.216

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.
Files changed (33) hide show
  1. package/es5.js +17638 -788
  2. package/index-BmGy3aNh.js +12611 -0
  3. package/index-BmGy3aNh.js.gz +0 -0
  4. package/index-Dv-J3JZD.js +93 -0
  5. package/index-Dv-J3JZD.js.gz +0 -0
  6. package/{index-ByhX5txj.js → index-WRedchsT.js} +1 -1
  7. package/index.js +3 -3
  8. package/package.json +6 -6
  9. package/packages/create-das-web-app/es5.js +36 -35
  10. package/packages/create-das-web-app/index.js +41 -40
  11. package/packages/create-das-web-app/index.js.gz +0 -0
  12. package/packages/i18n/es5.js +73 -71
  13. package/packages/i18n/index.js +62 -60
  14. package/packages/i18n/index.js.gz +0 -0
  15. package/packages/main-app-framework/es5.js +14780 -785
  16. package/packages/main-app-framework/index-BqKJ4JMx.js +11145 -0
  17. package/packages/main-app-framework/index-BqKJ4JMx.js.gz +0 -0
  18. package/packages/main-app-framework/index-CI6ZgPEU.js +93 -0
  19. package/packages/main-app-framework/index-CI6ZgPEU.js.gz +0 -0
  20. package/packages/main-app-framework/{index-DNJZ92iQ.js → index-DRkEsoNL.js} +1 -1
  21. package/packages/main-app-framework/index.js +1 -1
  22. package/packages/main-app-framework/style.css +1 -1
  23. package/packages/main-app-framework/style.css.gz +0 -0
  24. package/style.css +1 -1
  25. package/style.css.gz +0 -0
  26. package/index-CwMqkq8C.js +0 -87
  27. package/index-CwMqkq8C.js.gz +0 -0
  28. package/index-dUNStNwI.js +0 -13962
  29. package/index-dUNStNwI.js.gz +0 -0
  30. package/packages/main-app-framework/index-BoCRcqvZ.js +0 -12499
  31. package/packages/main-app-framework/index-BoCRcqvZ.js.gz +0 -0
  32. package/packages/main-app-framework/index-D1wc5Rgr.js +0 -87
  33. package/packages/main-app-framework/index-D1wc5Rgr.js.gz +0 -0
Binary file
@@ -0,0 +1,93 @@
1
+ import { ref as d, computed as p, defineComponent as U, withDirectives as C, openBlock as A, createBlock as S, unref as f, withCtx as I, createVNode as j, vShow as D } from "vue";
2
+ import { layoutData as $ } from "@das-fed/upf-web/packages/layout/index";
3
+ import { t as x } from "@das-fed/upf-web/packages/i18n/index";
4
+ import { DasAppContainer as T } from "@das-fed/upf-ui/packages/business-components/app-container/index";
5
+ import { DasSpin as E } from "@das-fed/upf-ui/packages/components/spin/index";
6
+ import { getTabInfo as L } from "@das-fed/upf-utils/common-info";
7
+ import { setShowLayout as P } from "@das-fed/upf-utils/common-tools";
8
+ import { createService as b } from "@das-fed/upf-utils/create-api-service";
9
+ import { u as q, p as B, c as h, l as K, g as M, a as N } from "./index-BmGy3aNh.js";
10
+ const O = d(!1), c = d([]);
11
+ p(() => {
12
+ var l;
13
+ return ((l = c.value) == null ? void 0 : l.map((u) => u.apps).flat()) || [];
14
+ });
15
+ d([]);
16
+ const V = "v1", F = b(`/api/justauth/client/${V}`), G = F.get("/visitor/kingdee/auth/user/auth_code"), oo = /* @__PURE__ */ U({
17
+ __name: "index",
18
+ setup(l) {
19
+ const { beforeEntryApp: u, entryApp: m } = q(), w = p(() => B.value.skinStyle), y = p(() => !!$.menu.items.length), _ = p(() => {
20
+ if (!c.value || !c.value.length) return [];
21
+ const t = h(c.value);
22
+ return Array.isArray(t) ? t.length ? (t.forEach((r) => {
23
+ r.apps = k(
24
+ r.apps.filter((o) => (o == null ? void 0 : o.code) && o.code !== "dasaiassistant"),
25
+ 4
26
+ );
27
+ }), t) : [] : [];
28
+ }), k = (t, r) => {
29
+ const o = [];
30
+ for (let a = 0; a < t.length; a += r)
31
+ o.push(t.slice(a, a + r));
32
+ return o;
33
+ }, v = async (t) => {
34
+ if (!t) return;
35
+ if (!sessionStorage.getItem("projectInfo")) {
36
+ window.confirm(x("系统资源更新,请刷新系统")) && (window.__isAutoCloseApp = !1, window.location.reload());
37
+ return;
38
+ }
39
+ const o = h(t);
40
+ if (K.innerSet = !0, o.routeUrl) {
41
+ if (t.code === "Ioc") {
42
+ window.open(o.routeUrl, "_blank");
43
+ return;
44
+ }
45
+ if (t.code === "wojiacloud") {
46
+ const e = sessionStorage.getItem("kingdee_token") || "";
47
+ if (e) {
48
+ const [n, s] = await G().run({ accessToken: e });
49
+ if (s) {
50
+ const i = (s == null ? void 0 : s.auth_code) ?? "";
51
+ o.routeUrl = o.routeUrl.includes("?") ? `${o.routeUrl}&code=${i}` : `${o.routeUrl}?code=${i}`;
52
+ }
53
+ }
54
+ }
55
+ }
56
+ const a = (t == null ? void 0 : t.openType) ?? 1, g = (t == null ? void 0 : t.type) ?? 1;
57
+ if (a === 1) {
58
+ if (!await u(t)) return;
59
+ const n = L().preTab[t.code], s = (n == null ? void 0 : n.code) ?? "", i = { ...(n == null ? void 0 : n.query) ?? {} };
60
+ m({ microApp: o, menuCode: s, route: { query: i } });
61
+ }
62
+ if (a === 2 && o.routeUrl) {
63
+ let e = "";
64
+ if (g === 1)
65
+ e = o != null && o.applicationPath ? location.origin + "/" + o.applicationPath + o.routeUrl : location.origin + o.routeUrl, e = P(e);
66
+ else if (g === 2) {
67
+ const n = await M(o.routeUrl, (o == null ? void 0 : o.param) ?? []);
68
+ e = N(n);
69
+ }
70
+ window.open(e, "_blank");
71
+ }
72
+ };
73
+ return (t, r) => C((A(), S(f(E), {
74
+ full: "",
75
+ spinning: f(O)
76
+ }, {
77
+ default: I(() => [
78
+ j(f(T), {
79
+ theme: w.value,
80
+ appCategorys: _.value,
81
+ onOpenApp: v
82
+ }, null, 8, ["theme", "appCategorys"])
83
+ ]),
84
+ _: 1
85
+ /* STABLE */
86
+ }, 8, ["spinning"])), [
87
+ [D, !y.value]
88
+ ]);
89
+ }
90
+ });
91
+ export {
92
+ oo as default
93
+ };
Binary file
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as r } from "vue";
2
- import { _ as c } from "./index-dUNStNwI.js";
2
+ import { _ as c } from "./index-BmGy3aNh.js";
3
3
  const o = {};
4
4
  function t(n, _) {
5
5
  return e(), r("div");
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { O as s, F as t, H as n, G as r, I as i, e as o, o as u, B as g, r as m, f as l, j as p, n as D, A as c, D as L, E as b, k as h, i as y, L as A, M as I, y as M, h as T, J as R, K as W, v as F, P as V, N as d, w as f, x as k, s as v, m as w, q as x, z as K, C as N, t as j } from "./index-dUNStNwI.js";
1
+ import { M as s, D as t, F as n, E as r, G as i, b as o, m as u, z as g, o as m, d as l, f as p, k as D, y as c, B as L, C as b, h, i as y, J as A, K as I, w as M, e as T, H as R, I as W, q as F, N as d, L as V, r as f, v as k, s as v, j as w, n as x, x as K, A as N, t as j } from "./index-BmGy3aNh.js";
2
2
  export {
3
3
  s as DasMainAppLayout,
4
4
  t as DasWebLayout,
@@ -24,8 +24,8 @@ export {
24
24
  R as layout,
25
25
  W as layoutData,
26
26
  F as loadLocale,
27
- V as mainAppFramework,
28
- d as microFrontend,
27
+ d as mainAppFramework,
28
+ V as microFrontend,
29
29
  f as microI18nStore,
30
30
  k as registerMicroI18nData,
31
31
  v as setI18nRule,
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@das-fed/upf-web",
3
- "version": "6.4.0-dev.214",
3
+ "version": "6.4.0-dev.216",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "dependencies": {
7
7
  "@das-fed/mframe": "0.0.41",
8
- "@das-fed/upf-ui": "6.4.0-dev.214",
9
- "@das-fed/upf-utils": "6.4.0-dev.214",
10
- "@das-fed/upf-web": "6.4.0-dev.214",
11
- "@das-fed/upf-web-components": "6.4.0-dev.214",
8
+ "@das-fed/upf-ui": "6.4.0-dev.216",
9
+ "@das-fed/upf-utils": "6.4.0-dev.216",
10
+ "@das-fed/upf-web": "6.4.0-dev.216",
11
+ "@das-fed/upf-web-components": "6.4.0-dev.216",
12
12
  "@microsoft/signalr": "^8.0.7",
13
13
  "@vueuse/core": "^9.13.0",
14
14
  "animate.css": "^4.1.1",
@@ -20,7 +20,7 @@
20
20
  "vue-router": "^4.4.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@das-fed/upf-cli": "6.4.0-dev.214",
23
+ "@das-fed/upf-cli": "6.4.0-dev.216",
24
24
  "@types/crypto-js": "^4.2.2",
25
25
  "@types/lodash": "^4.14.194",
26
26
  "@types/lodash-es": "^4.17.12",
@@ -25,14 +25,14 @@ var vue = require('vue');
25
25
  var index = require('@das-fed/upf-web/packages/theme/index/es5');
26
26
  var index$1 = require('@das-fed/upf-web/packages/layout/index/es5');
27
27
  var pinia = require('pinia');
28
- var D = require('pinia-plugin-persistedstate');
28
+ var M = require('pinia-plugin-persistedstate');
29
29
  var vueRouter = require('vue-router');
30
30
  var index$2 = require('@das-fed/upf-web/packages/i18n/index/es5');
31
- var I = {
31
+ var q = {
32
32
  install: function install(e, u) {
33
33
  var l;
34
- var f = (l = u == null ? undefined : u.plugins) == null ? undefined : l.glob;
35
- f && Object.values(f).sort(function (t, c) {
34
+ var i = (l = u == null ? undefined : u.plugins) == null ? undefined : l.glob;
35
+ i && Object.values(i).sort(function (t, c) {
36
36
  var _t$index, _c$index;
37
37
  return ((_t$index = t.index) !== null && _t$index !== void 0 ? _t$index : 0) - ((_c$index = c.index) !== null && _c$index !== void 0 ? _c$index : 0);
38
38
  }).filter(function (t) {
@@ -43,12 +43,12 @@ var I = {
43
43
  }
44
44
  },
45
45
  b = pinia.createPinia();
46
- b.use(D);
47
- var q = function q(e) {
46
+ b.use(M);
47
+ var z = function z(e) {
48
48
  var _ref;
49
- var y, R, v, k, x;
50
- var u = (_ref = (y = e == null ? undefined : e.router) == null ? undefined : y.routerBase) !== null && _ref !== void 0 ? _ref : "/",
51
- f = ((R = e == null ? undefined : e.router) == null ? undefined : R.options) || {};
49
+ var R, y, v, k, $;
50
+ var u = (_ref = (R = e == null ? undefined : e.router) == null ? undefined : R.routerBase) !== null && _ref !== void 0 ? _ref : "/",
51
+ i = ((y = e == null ? undefined : e.router) == null ? undefined : y.options) || {};
52
52
  var l = Object.assign(((v = e == null ? undefined : e.router) == null ? undefined : v.glob) || {});
53
53
  var t = Object.values(l).filter(function (n) {
54
54
  return !!n;
@@ -61,9 +61,9 @@ var q = function q(e) {
61
61
  var g;
62
62
  var a = Object.values(((g = n.router) == null ? undefined : g.glob) || {}).filter(function (r) {
63
63
  return !!r;
64
- }).flat().sort(function (r, p) {
65
- var _r$index, _p$index;
66
- return ((_r$index = r.index) !== null && _r$index !== void 0 ? _r$index : 0) - ((_p$index = p.index) !== null && _p$index !== void 0 ? _p$index : 0);
64
+ }).flat().sort(function (r, h) {
65
+ var _r$index, _h$index;
66
+ return ((_r$index = r.index) !== null && _r$index !== void 0 ? _r$index : 0) - ((_h$index = h.index) !== null && _h$index !== void 0 ? _h$index : 0);
67
67
  });
68
68
  c.push.apply(c, _toConsumableArray(a.map(function (r) {
69
69
  return _objectSpread(_objectSpread({}, r), {}, {
@@ -87,14 +87,14 @@ var q = function q(e) {
87
87
  };
88
88
  })));
89
89
  });
90
- var i = ((x = e == null ? undefined : e.router) == null ? undefined : x.routers) || [],
91
- d = [].concat(_toConsumableArray(A(t, e)), _toConsumableArray(A(i, e)), _toConsumableArray(A(c, e))),
90
+ var m = (($ = e == null ? undefined : e.router) == null ? undefined : $.routers) || [],
91
+ d = [].concat(_toConsumableArray(A(t, e)), _toConsumableArray(A(m, e)), _toConsumableArray(A(c, e))),
92
92
  w = vueRouter.createRouter(_objectSpread({
93
93
  history: vueRouter.createWebHistory(u),
94
94
  routes: d
95
- }, f)),
96
- h = index$2.microI18nStore;
97
- if (Array.isArray(e == null ? undefined : e.microApps) && e.microApps.length && h) {
95
+ }, i)),
96
+ p = index$2.microI18nStore;
97
+ if (Array.isArray(e == null ? undefined : e.microApps) && e.microApps.length && p) {
98
98
  var n = /* @__PURE__ */new Map();
99
99
  var _iterator = _createForOfIteratorHelper(e.microApps),
100
100
  _step;
@@ -110,12 +110,12 @@ var q = function q(e) {
110
110
  }
111
111
  w.beforeEach(/*#__PURE__*/function () {
112
112
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(a, g, r) {
113
- var p, m, $, _iterator2, _step2, _step2$value, o, s, L, _t, _t2, _t3;
113
+ var h, s, x, _iterator2, _step2, _step2$value, o, f, L, _t, _t2, _t3;
114
114
  return _regenerator().w(function (_context) {
115
115
  while (1) switch (_context.p = _context.n) {
116
116
  case 0:
117
117
  _context.p = 0;
118
- m = ((p = a.query) == null ? void 0 : p.lang) || window.localStorage.getItem(index$2.languageKey) || window.navigator.language || "zh-CN", $ = a.path || "";
118
+ s = ((h = a.query) == null ? void 0 : h.lang) || window.localStorage.getItem(index$2.languageKey) || window.navigator.language || "zh-CN", x = a.path || "";
119
119
  _iterator2 = _createForOfIteratorHelper(n.entries());
120
120
  _context.p = 1;
121
121
  _iterator2.s();
@@ -124,31 +124,31 @@ var q = function q(e) {
124
124
  _context.n = 10;
125
125
  break;
126
126
  }
127
- _step2$value = _slicedToArray(_step2.value, 2), o = _step2$value[0], s = _step2$value[1];
128
- if (!(!o || !$.toLowerCase().startsWith("/".concat(o.toLowerCase())))) {
127
+ _step2$value = _slicedToArray(_step2.value, 2), o = _step2$value[0], f = _step2$value[1];
128
+ if (!(!o || !x.toLowerCase().startsWith("/".concat(o.toLowerCase())))) {
129
129
  _context.n = 3;
130
130
  break;
131
131
  }
132
132
  return _context.a(3, 9);
133
133
  case 3:
134
- if (!(h.isLoaded(m, o) || !s || !(s != null && s.length))) {
134
+ if (!(p.isLoaded(s, o) || !f || !(f != null && f.length))) {
135
135
  _context.n = 4;
136
136
  break;
137
137
  }
138
138
  return _context.a(3, 10);
139
139
  case 4:
140
- L = typeof s == "string" ? [s] : s;
141
- h.markLoaded(m, o);
140
+ L = typeof f == "string" ? [f] : f;
141
+ p.markLoaded(s, o);
142
142
  _context.p = 5;
143
143
  _context.n = 6;
144
- return index$2.registerMicroI18nData(L, m);
144
+ return index$2.registerMicroI18nData(L, s);
145
145
  case 6:
146
146
  _context.n = 8;
147
147
  break;
148
148
  case 7:
149
149
  _context.p = 7;
150
150
  _t = _context.v;
151
- h.markUnloaded(m, o);
151
+ p.markUnloaded(s, o), console.error("[initRouter] load micro app i18n failed for ".concat(o, ":"), _t);
152
152
  case 8:
153
153
  return _context.a(3, 10);
154
154
  case 9:
@@ -171,6 +171,7 @@ var q = function q(e) {
171
171
  case 14:
172
172
  _context.p = 14;
173
173
  _t3 = _context.v;
174
+ console.error("[initRouter] microApps i18n beforeEach handler error:", _t3);
174
175
  case 15:
175
176
  _context.p = 15;
176
177
  r();
@@ -190,10 +191,10 @@ var q = function q(e) {
190
191
  };
191
192
  },
192
193
  A = function A(e, u) {
193
- return e.map(function (f) {
194
+ return e.map(function (i) {
194
195
  var _ref3, _l$keepAlive;
195
- var l = f.meta || {};
196
- return l.keepAlive = (_ref3 = (_l$keepAlive = l.keepAlive) !== null && _l$keepAlive !== void 0 ? _l$keepAlive : u == null ? undefined : u.keepAlive) !== null && _ref3 !== void 0 ? _ref3 : true, _objectSpread(_objectSpread({}, f), {}, {
196
+ var l = i.meta || {};
197
+ return l.keepAlive = (_ref3 = (_l$keepAlive = l.keepAlive) !== null && _l$keepAlive !== void 0 ? _l$keepAlive : u == null ? undefined : u.keepAlive) !== null && _ref3 !== void 0 ? _ref3 : true, _objectSpread(_objectSpread({}, i), {}, {
197
198
  meta: l
198
199
  });
199
200
  });
@@ -206,16 +207,16 @@ var q = function q(e) {
206
207
  u.value = false;
207
208
  });
208
209
  var _ref4 = (e == null ? undefined : e.root) || {},
209
- f = _ref4.container,
210
+ i = _ref4.container,
210
211
  l = _ref4.component,
211
212
  t = _ref4.props,
212
213
  c = vue.createApp(l || index$1.DasWebLayout, t);
213
- c.use(I, e), c.use(b);
214
- var _q = q(e),
215
- i = _q.router;
216
- return c.use(i), c.mount(f || "#app"), (d = window.top) != null && d.vueRouter || window.top && (window.top.vueRouter = i), {
214
+ c.use(q, e), c.use(b);
215
+ var _z = z(e),
216
+ m = _z.router;
217
+ return c.use(m), c.mount(i || "#app"), (d = window.top) != null && d.vueRouter || window.top && (window.top.vueRouter = m), {
217
218
  app: c,
218
- router: i,
219
+ router: m,
219
220
  loading: u,
220
221
  store: b
221
222
  };
@@ -1,28 +1,28 @@
1
- import { ref as N, createApp as W } from "vue";
2
- import { initTheme as O } from "@das-fed/upf-web/packages/theme/index";
3
- import { DasWebLayout as P } from "@das-fed/upf-web/packages/layout/index";
4
- import { createPinia as j } from "pinia";
5
- import D from "pinia-plugin-persistedstate";
6
- import { createRouter as M, createWebHistory as C } from "vue-router";
7
- import { languageKey as S, registerMicroI18nData as B, microI18nStore as E } from "@das-fed/upf-web/packages/i18n/index";
8
- const I = {
1
+ import { ref as W, createApp as O } from "vue";
2
+ import { initTheme as P } from "@das-fed/upf-web/packages/theme/index";
3
+ import { DasWebLayout as j } from "@das-fed/upf-web/packages/layout/index";
4
+ import { createPinia as D } from "pinia";
5
+ import M from "pinia-plugin-persistedstate";
6
+ import { createRouter as C, createWebHistory as E } from "vue-router";
7
+ import { languageKey as S, registerMicroI18nData as B, microI18nStore as I } from "@das-fed/upf-web/packages/i18n/index";
8
+ const q = {
9
9
  install: (e, u) => {
10
10
  var l;
11
- const f = (l = u == null ? void 0 : u.plugins) == null ? void 0 : l.glob;
12
- f && Object.values(f).sort((t, c) => (t.index ?? 0) - (c.index ?? 0)).filter((t) => t ? !!(t.default && t.default.install || t.install) : !1).forEach((t) => {
11
+ const i = (l = u == null ? void 0 : u.plugins) == null ? void 0 : l.glob;
12
+ i && Object.values(i).sort((t, c) => (t.index ?? 0) - (c.index ?? 0)).filter((t) => t ? !!(t.default && t.default.install || t.install) : !1).forEach((t) => {
13
13
  t.default && t.default.install && e.use(t.default, u), t.install && e.use(t, u);
14
14
  });
15
15
  }
16
- }, b = j();
17
- b.use(D);
18
- const q = (e) => {
19
- var y, R, v, k, x;
20
- const u = ((y = e == null ? void 0 : e.router) == null ? void 0 : y.routerBase) ?? "/", f = ((R = e == null ? void 0 : e.router) == null ? void 0 : R.options) || {};
16
+ }, b = D();
17
+ b.use(M);
18
+ const z = (e) => {
19
+ var R, y, v, k, $;
20
+ const u = ((R = e == null ? void 0 : e.router) == null ? void 0 : R.routerBase) ?? "/", i = ((y = e == null ? void 0 : e.router) == null ? void 0 : y.options) || {};
21
21
  let l = Object.assign(((v = e == null ? void 0 : e.router) == null ? void 0 : v.glob) || {});
22
22
  const t = Object.values(l).filter((n) => !!n).flat().sort((n, a) => (n.index ?? 0) - (a.index ?? 0)), c = [];
23
23
  (k = e == null ? void 0 : e.microApps) == null || k.map((n) => {
24
24
  var g;
25
- const a = Object.values(((g = n.router) == null ? void 0 : g.glob) || {}).filter((r) => !!r).flat().sort((r, p) => (r.index ?? 0) - (p.index ?? 0));
25
+ const a = Object.values(((g = n.router) == null ? void 0 : g.glob) || {}).filter((r) => !!r).flat().sort((r, h) => (r.index ?? 0) - (h.index ?? 0));
26
26
  c.push(
27
27
  ...a.map((r) => ({ ...r, path: `/${n.microAppName}${r.path}` }))
28
28
  ), c.push(
@@ -33,52 +33,53 @@ const q = (e) => {
33
33
  }))
34
34
  );
35
35
  });
36
- const i = ((x = e == null ? void 0 : e.router) == null ? void 0 : x.routers) || [], d = [
36
+ const m = (($ = e == null ? void 0 : e.router) == null ? void 0 : $.routers) || [], d = [
37
37
  ...A(t, e),
38
- ...A(i, e),
38
+ ...A(m, e),
39
39
  ...A(c, e)
40
- ], w = M({ history: C(u), routes: d, ...f }), h = E;
41
- if (Array.isArray(e == null ? void 0 : e.microApps) && e.microApps.length && h) {
40
+ ], w = C({ history: E(u), routes: d, ...i }), p = I;
41
+ if (Array.isArray(e == null ? void 0 : e.microApps) && e.microApps.length && p) {
42
42
  const n = /* @__PURE__ */ new Map();
43
43
  for (const a of e.microApps)
44
44
  a != null && a.microAppName && (a != null && a.i18n) && n.set(a.microAppName, a.i18n);
45
45
  w.beforeEach(async (a, g, r) => {
46
- var p;
46
+ var h;
47
47
  try {
48
- const m = ((p = a.query) == null ? void 0 : p.lang) || window.localStorage.getItem(S) || window.navigator.language || "zh-CN", $ = a.path || "";
49
- for (const [o, s] of n.entries()) {
50
- if (!o || !$.toLowerCase().startsWith(`/${o.toLowerCase()}`)) continue;
51
- if (h.isLoaded(m, o) || !s || !(s != null && s.length)) break;
52
- const L = typeof s == "string" ? [s] : s;
53
- h.markLoaded(m, o);
48
+ const s = ((h = a.query) == null ? void 0 : h.lang) || window.localStorage.getItem(S) || window.navigator.language || "zh-CN", x = a.path || "";
49
+ for (const [o, f] of n.entries()) {
50
+ if (!o || !x.toLowerCase().startsWith(`/${o.toLowerCase()}`)) continue;
51
+ if (p.isLoaded(s, o) || !f || !(f != null && f.length)) break;
52
+ const L = typeof f == "string" ? [f] : f;
53
+ p.markLoaded(s, o);
54
54
  try {
55
- await B(L, m);
56
- } catch {
57
- h.markUnloaded(m, o);
55
+ await B(L, s);
56
+ } catch (N) {
57
+ p.markUnloaded(s, o), console.error(`[initRouter] load micro app i18n failed for ${o}:`, N);
58
58
  }
59
59
  break;
60
60
  }
61
- } catch {
61
+ } catch (s) {
62
+ console.error("[initRouter] microApps i18n beforeEach handler error:", s);
62
63
  } finally {
63
64
  r();
64
65
  }
65
66
  });
66
67
  }
67
68
  return { router: w };
68
- }, A = (e, u) => e.map((f) => {
69
- const l = f.meta || {};
70
- return l.keepAlive = l.keepAlive ?? (u == null ? void 0 : u.keepAlive) ?? !0, { ...f, meta: l };
69
+ }, A = (e, u) => e.map((i) => {
70
+ const l = i.meta || {};
71
+ return l.keepAlive = l.keepAlive ?? (u == null ? void 0 : u.keepAlive) ?? !0, { ...i, meta: l };
71
72
  }), Q = (e) => {
72
73
  var d;
73
74
  e || (e = {});
74
- const u = N(!0);
75
- Promise.all([O(e)]).then(() => {
75
+ const u = W(!0);
76
+ Promise.all([P(e)]).then(() => {
76
77
  u.value = !1;
77
78
  });
78
- const { container: f, component: l, props: t } = (e == null ? void 0 : e.root) || {}, c = W(l || P, t);
79
- c.use(I, e), c.use(b);
80
- const { router: i } = q(e);
81
- return c.use(i), c.mount(f || "#app"), (d = window.top) != null && d.vueRouter || window.top && (window.top.vueRouter = i), { app: c, router: i, loading: u, store: b };
79
+ const { container: i, component: l, props: t } = (e == null ? void 0 : e.root) || {}, c = O(l || j, t);
80
+ c.use(q, e), c.use(b);
81
+ const { router: m } = z(e);
82
+ return c.use(m), c.mount(i || "#app"), (d = window.top) != null && d.vueRouter || window.top && (window.top.vueRouter = m), { app: c, router: m, loading: u, store: b };
82
83
  };
83
84
  export {
84
85
  Q as createDasWebApp