@das-fed/upf-web 6.4.0-dev.192 → 6.4.0-dev.193

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.
@@ -1,59 +1,59 @@
1
- import { ref as o, createApp as x } from "vue";
2
- import { initTheme as w } from "@das-fed/upf-web/packages/theme/index";
3
- import { initI18n as O } from "@das-fed/upf-web/packages/i18n/index";
4
- import { DasWebLayout as P } from "@das-fed/upf-web/packages/layout/index";
5
- import { createPinia as W } from "pinia";
6
- import $ from "pinia-plugin-persistedstate";
7
- import { createRouter as j, createWebHistory as k } from "vue-router";
8
- const y = {
9
- install: (e, u) => {
1
+ import { ref as v, createApp as w } from "vue";
2
+ import { initTheme as x } from "@das-fed/upf-web/packages/theme/index";
3
+ import { initI18n as L } from "@das-fed/upf-web/packages/i18n/index";
4
+ import { DasWebLayout as O } from "@das-fed/upf-web/packages/layout/index";
5
+ import { createPinia as P } from "pinia";
6
+ import W from "pinia-plugin-persistedstate";
7
+ import { createRouter as $, createWebHistory as j } from "vue-router";
8
+ const k = {
9
+ install: (e, a) => {
10
10
  var l;
11
- const c = (l = u == null ? void 0 : u.plugins) == null ? void 0 : l.glob;
12
- c && Object.values(c).sort((t, a) => (t.index ?? 0) - (a.index ?? 0)).filter((t) => t ? !!(t.default && t.default.install || t.install) : !1).forEach((t) => {
13
- t.default && t.default.install && e.use(t.default, u), t.install && e.use(t, u);
11
+ const c = (l = a == null ? void 0 : a.plugins) == null ? void 0 : l.glob;
12
+ c && Object.values(c).sort((t, u) => (t.index ?? 0) - (u.index ?? 0)).filter((t) => t ? !!(t.default && t.default.install || t.install) : !1).forEach((t) => {
13
+ t.default && t.default.install && e.use(t.default, a), t.install && e.use(t, a);
14
14
  });
15
15
  }
16
- }, d = W();
17
- d.use($);
18
- const D = (e) => {
19
- var h, b, p, A, g;
20
- const u = ((h = e == null ? void 0 : e.router) == null ? void 0 : h.routerBase) ?? "/", c = ((b = e == null ? void 0 : e.router) == null ? void 0 : b.options) || {};
21
- let l = Object.assign(((p = e == null ? void 0 : e.router) == null ? void 0 : p.glob) || {});
22
- const t = Object.values(l).filter((f) => !!f).flat().sort((f, m) => (f.index ?? 0) - (m.index ?? 0)), a = [];
23
- (A = e == null ? void 0 : e.microApps) == null || A.map((f) => {
24
- var R;
25
- const m = Object.values(((R = f.router) == null ? void 0 : R.glob) || {}).filter((r) => !!r).flat().sort((r, v) => (r.index ?? 0) - (v.index ?? 0));
26
- a.push(
27
- ...m.map((r) => ({ ...r, path: `/${f.microAppName}${r.path}` }))
28
- ), a.push(
29
- ...m.filter((r) => !!r.path).filter((r) => r.path !== "").filter((r) => r.path !== "/").filter((r) => !r.path.startsWith(`/${r.microAppName}`)).map((r) => ({
16
+ }, i = P();
17
+ i.use(W);
18
+ const y = (e) => {
19
+ var d, h, b, g, p;
20
+ const a = ((d = e == null ? void 0 : e.router) == null ? void 0 : d.routerBase) ?? "/", c = ((h = e == null ? void 0 : e.router) == null ? void 0 : h.options) || {};
21
+ let l = Object.assign(((b = e == null ? void 0 : e.router) == null ? void 0 : b.glob) || {});
22
+ const t = Object.values(l).filter((s) => !!s).flat().sort((s, m) => (s.index ?? 0) - (m.index ?? 0)), u = [];
23
+ (g = e == null ? void 0 : e.microApps) == null || g.map((s) => {
24
+ var A;
25
+ const m = Object.values(((A = s.router) == null ? void 0 : A.glob) || {}).filter((r) => !!r).flat().sort((r, R) => (r.index ?? 0) - (R.index ?? 0));
26
+ u.push(
27
+ ...m.map((r) => ({ ...r, path: `/${s.microAppName}${r.path}` }))
28
+ ), u.push(
29
+ ...m.filter((r) => !!r.path).filter((r) => r.path !== "").filter((r) => r.path !== "/").filter((r) => !r.path.toLocaleLowerCase().startsWith(`/${r.microAppName}`.toLocaleLowerCase())).map((r) => ({
30
30
  path: r.path,
31
- redirect: `/${f.microAppName}${r.path}`,
31
+ redirect: `/${s.microAppName}${r.path}`,
32
32
  meta: { ...r.meta || {}, isMicroAppRouteRedirect: !0 }
33
33
  }))
34
34
  );
35
35
  });
36
- const s = ((g = e == null ? void 0 : e.router) == null ? void 0 : g.routers) || [], n = [
37
- ...i(t, e),
38
- ...i(s, e),
39
- ...i(a, e)
36
+ const f = ((p = e == null ? void 0 : e.router) == null ? void 0 : p.routers) || [], n = [
37
+ ...o(t, e),
38
+ ...o(f, e),
39
+ ...o(u, e)
40
40
  ];
41
- return { router: j({ history: k(u), routes: n, ...c }) };
42
- }, i = (e, u) => e.map((c) => {
41
+ return console.log("routerBase====", a), console.log("routes====", n), { router: $({ history: j(a), routes: n, ...c }) };
42
+ }, o = (e, a) => e.map((c) => {
43
43
  const l = c.meta || {};
44
- return l.keepAlive = l.keepAlive ?? (u == null ? void 0 : u.keepAlive) ?? !0, { ...c, meta: l };
45
- }), q = (e) => {
44
+ return l.keepAlive = l.keepAlive ?? (a == null ? void 0 : a.keepAlive) ?? !0, { ...c, meta: l };
45
+ }), T = (e) => {
46
46
  var n;
47
47
  e || (e = {});
48
- const u = o(!0);
49
- Promise.all([w(e), O(e)]).then(() => {
50
- u.value = !1;
48
+ const a = v(!0);
49
+ Promise.all([x(e), L(e)]).then(() => {
50
+ a.value = !1;
51
51
  });
52
- const { container: c, component: l, props: t } = (e == null ? void 0 : e.root) || {}, a = x(l || P, t);
53
- a.use(y, e), a.use(d);
54
- const { router: s } = D(e);
55
- return a.use(s), a.mount(c || "#app"), (n = window.top) != null && n.vueRouter || window.top && (window.top.vueRouter = s), { app: a, router: s, loading: u, store: d };
52
+ const { container: c, component: l, props: t } = (e == null ? void 0 : e.root) || {}, u = w(l || O, t);
53
+ u.use(k, e), u.use(i);
54
+ const { router: f } = y(e);
55
+ return u.use(f), u.mount(c || "#app"), (n = window.top) != null && n.vueRouter || window.top && (window.top.vueRouter = f), { app: u, router: f, loading: a, store: i };
56
56
  };
57
57
  export {
58
- q as createDasWebApp
58
+ T as createDasWebApp
59
59
  };
@@ -867,6 +867,7 @@ var l = {
867
867
  case 4:
868
868
  _context2.p = 4;
869
869
  _t = _context2.v;
870
+ console.warn("\u672A\u627E\u5230\u5BF9\u5E94\u7684\u8BED\u8A00\u5305: ".concat(_t));
870
871
  case 5:
871
872
  return _context2.a(2);
872
873
  }
@@ -180,7 +180,8 @@ const l = {
180
180
  try {
181
181
  const n = await r.ant();
182
182
  return await r.dayjs(), n.default;
183
- } catch {
183
+ } catch (n) {
184
+ console.warn(`未找到对应的语言包: ${n}`);
184
185
  }
185
186
  };
186
187
  export {
Binary file