@das-fed/upf-web 6.4.0-dev.170 → 6.4.0-dev.171
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-Dd-xqNVr.js +10 -0
- package/{index-NR-7IC-G.js → index-Dug_Wk1g.js} +3031 -2971
- package/index-Dug_Wk1g.js.gz +0 -0
- package/{packages/main-app-framework/index-Ca8rCVMz.js → index-pcWmKaLO.js} +3 -3
- package/index-pcWmKaLO.js.gz +0 -0
- package/index.js +1 -1
- package/package.json +6 -6
- package/packages/layout/index.js +3 -3
- package/packages/layout/index.js.gz +0 -0
- package/packages/main-app-framework/{index-jQDwtlWQ.js → index-Baf-Y_qd.js} +2042 -1982
- package/packages/main-app-framework/index-Baf-Y_qd.js.gz +0 -0
- package/{index-afISleAK.js → packages/main-app-framework/index-DuVrvo83.js} +3 -3
- package/packages/main-app-framework/index-DuVrvo83.js.gz +0 -0
- package/packages/main-app-framework/index-uW74FRYq.js +10 -0
- package/packages/main-app-framework/index.js +1 -1
- package/packages/micro-frontend/index.js +115 -110
- package/packages/micro-frontend/index.js.gz +0 -0
- package/index-D72GvFXQ.js +0 -10
- package/index-NR-7IC-G.js.gz +0 -0
- package/index-afISleAK.js.gz +0 -0
- package/packages/main-app-framework/index-Ca8rCVMz.js.gz +0 -0
- package/packages/main-app-framework/index-DbcmTmfR.js +0 -10
- package/packages/main-app-framework/index-jQDwtlWQ.js.gz +0 -0
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as k, computed as p, withDirectives as v,
|
|
1
|
+
import { defineComponent as k, computed as p, withDirectives as v, openBlock as U, createBlock as C, unref as c, withCtx as A, createVNode as S, vShow as I } from "vue";
|
|
2
2
|
import { layoutData as j } from "@das-fed/upf-web/packages/layout/index";
|
|
3
3
|
import { t as D } from "@das-fed/upf-web/packages/i18n/index";
|
|
4
4
|
import { DasAppContainer as $ } from "@das-fed/upf-ui/packages/business-components/app-container/index";
|
|
@@ -6,7 +6,7 @@ import { DasSpin as x } from "@das-fed/upf-ui/packages/components/spin/index";
|
|
|
6
6
|
import { getTabInfo as T } from "@das-fed/upf-utils/common-info";
|
|
7
7
|
import { setShowLayout as b } from "@das-fed/upf-utils/common-tools";
|
|
8
8
|
import { createService as E } from "@das-fed/upf-utils/create-api-service";
|
|
9
|
-
import { u as L, p as P, a as u, c as f, b as q, l as B, g as K, d as M } from "./index-
|
|
9
|
+
import { u as L, p as P, a as u, c as f, b as q, l as B, g as K, d as M } from "./index-Baf-Y_qd.js";
|
|
10
10
|
const N = "v1", O = E(`/api/justauth/client/${N}`), V = O.get("/visitor/kingdee/auth/user/auth_code"), z = /* @__PURE__ */ k({
|
|
11
11
|
__name: "index",
|
|
12
12
|
setup(F) {
|
|
@@ -64,7 +64,7 @@ const N = "v1", O = E(`/api/justauth/client/${N}`), V = O.get("/visitor/kingdee/
|
|
|
64
64
|
window.open(e, "_blank");
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
return (t, r) => v((
|
|
67
|
+
return (t, r) => v((U(), C(c(x), {
|
|
68
68
|
full: "",
|
|
69
69
|
spinning: c(q)
|
|
70
70
|
}, {
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@das-fed/upf-web/packages/micro-frontend/style.css';
|
|
2
|
-
import { ref as w, watch as M, reactive as
|
|
3
|
-
import { DasWebLayout as ye,
|
|
4
|
-
const
|
|
2
|
+
import { ref as w, watch as M, reactive as T, getCurrentScope as ue, onScopeDispose as de, unref as I, getCurrentInstance as fe, onMounted as pe, nextTick as ne, defineComponent as x, computed as N, openBlock as E, createElementBlock as D, Fragment as z, renderList as me, withDirectives as ve, createBlock as se, vShow as he, createCommentVNode as Ae, mergeProps as we, withCtx as C, renderSlot as V, createVNode as O, onActivated as ge } from "vue";
|
|
3
|
+
import { DasWebLayout as ye, DasWebNav as Me, DasWebMenu as Le, DasWebTabs as _e } from "@das-fed/upf-web/packages/layout/index";
|
|
4
|
+
const W = w("/das-micro-app"), m = w([]), k = w(!1), F = w([]), R = w(!0);
|
|
5
5
|
let v = null, h = null, _ = null;
|
|
6
6
|
const be = (e) => new Promise((t) => {
|
|
7
7
|
const n = () => {
|
|
@@ -69,7 +69,7 @@ const be = (e) => new Promise((t) => {
|
|
|
69
69
|
};
|
|
70
70
|
}, Q = async (e) => {
|
|
71
71
|
await Promise.all(
|
|
72
|
-
|
|
72
|
+
m.value.filter((t) => t.loaded).map((t) => new Promise(async (n) => {
|
|
73
73
|
t.dom || await new Promise((s) => M(() => t.dom, s)), setTimeout(() => {
|
|
74
74
|
b(t.name, "sessionStorage", e), n(!0);
|
|
75
75
|
}, 0);
|
|
@@ -78,14 +78,14 @@ const be = (e) => new Promise((t) => {
|
|
|
78
78
|
}, d = {
|
|
79
79
|
loadMicroApp: (e) => {
|
|
80
80
|
k.value = !0;
|
|
81
|
-
const t =
|
|
81
|
+
const t = m.value.find((i) => i.name === e), n = m.value.find((i) => i.actived), s = !!t, c = !(t != null && t.loaded), a = t == null ? void 0 : t.actived;
|
|
82
82
|
if (!s) {
|
|
83
83
|
n && (n.actived = !1);
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
if (t.isFirstActived = !0, c) {
|
|
87
87
|
t.src = t.entry;
|
|
88
|
-
const i =
|
|
88
|
+
const i = m.value.find((r) => r.actived);
|
|
89
89
|
i && (i.actived = !1), t.loaded = !0, t.actived = !0;
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
@@ -95,7 +95,7 @@ const be = (e) => new Promise((t) => {
|
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
97
|
hideMicroApp: async (e) => {
|
|
98
|
-
const t =
|
|
98
|
+
const t = m.value.find((n) => n.name === e);
|
|
99
99
|
t && t.loaded && (t.dom || await new Promise((n) => M(() => t.dom, n)), b(e, "router", {
|
|
100
100
|
cmd: "push",
|
|
101
101
|
route: {
|
|
@@ -105,21 +105,21 @@ const be = (e) => new Promise((t) => {
|
|
|
105
105
|
}));
|
|
106
106
|
},
|
|
107
107
|
hideAllMicroApp: () => {
|
|
108
|
-
k.value = !1,
|
|
108
|
+
k.value = !1, m.value.map((e) => {
|
|
109
109
|
e.actived = !1;
|
|
110
110
|
});
|
|
111
111
|
},
|
|
112
112
|
unloadMicroApp: (e) => {
|
|
113
|
-
const t =
|
|
113
|
+
const t = m.value.find((n) => n.name === e);
|
|
114
114
|
t && (t.loaded = !1, t.actived = !1, t.dom = void 0);
|
|
115
115
|
},
|
|
116
116
|
unloadAllMicroApp: () => {
|
|
117
|
-
k.value = !1,
|
|
117
|
+
k.value = !1, m.value.map((e) => {
|
|
118
118
|
e.loaded = !1, e.actived = !1, e.dom = void 0;
|
|
119
119
|
});
|
|
120
120
|
},
|
|
121
121
|
setMicroAppRoute: async (e, t, n) => {
|
|
122
|
-
const s =
|
|
122
|
+
const s = m.value.find((r) => r.name === t);
|
|
123
123
|
if (!s || !s.loaded || !s.actived || (s.dom || await new Promise((r) => M(() => s.dom, r)), !s.actived)) return s;
|
|
124
124
|
const c = n.path || n, a = n.query || {}, i = n.params || {};
|
|
125
125
|
return e.push({
|
|
@@ -179,17 +179,17 @@ const be = (e) => new Promise((t) => {
|
|
|
179
179
|
}
|
|
180
180
|
},
|
|
181
181
|
reloadMicroAppRoute: async (e, t) => {
|
|
182
|
-
const n =
|
|
182
|
+
const n = m.value.find((s) => s.name === e);
|
|
183
183
|
n && (!n.loaded || !n.actived || (n.dom || await new Promise((s) => M(() => n.dom, s)), b(e, "route", { cmd: "reload", path: t })));
|
|
184
184
|
},
|
|
185
185
|
unloadMicroAppRoute: async (e, t) => {
|
|
186
|
-
const n =
|
|
186
|
+
const n = m.value.find((s) => s.name === e);
|
|
187
187
|
n && (!n.loaded || !n.actived || (n.dom || await new Promise((s) => M(() => n.dom, s)), b(e, "route", { cmd: "unload", path: t })));
|
|
188
188
|
},
|
|
189
189
|
setMainAppLayoutVisible: (e) => {
|
|
190
190
|
q("layoutVisible", { visible: e });
|
|
191
191
|
}
|
|
192
|
-
},
|
|
192
|
+
}, l = T({
|
|
193
193
|
visible: !1,
|
|
194
194
|
theme: "default",
|
|
195
195
|
logo: "",
|
|
@@ -201,54 +201,54 @@ const be = (e) => new Promise((t) => {
|
|
|
201
201
|
// activeItem: '',
|
|
202
202
|
// activeProject: {},
|
|
203
203
|
eventListeners: {}
|
|
204
|
-
}),
|
|
204
|
+
}), j = {
|
|
205
205
|
show: () => {
|
|
206
|
-
|
|
206
|
+
l.visible = !0;
|
|
207
207
|
},
|
|
208
208
|
hide: () => {
|
|
209
|
-
|
|
209
|
+
l.visible = !1;
|
|
210
210
|
},
|
|
211
211
|
setLogo: (e) => {
|
|
212
|
-
|
|
212
|
+
l.logo = e;
|
|
213
213
|
},
|
|
214
214
|
setTheme: (e) => {
|
|
215
|
-
|
|
215
|
+
l.theme = e;
|
|
216
216
|
},
|
|
217
217
|
setItems: (e) => {
|
|
218
|
-
|
|
218
|
+
l.visible || (l.visible = !0), l.items = e;
|
|
219
219
|
},
|
|
220
|
-
getItems: () =>
|
|
220
|
+
getItems: () => l.items,
|
|
221
221
|
removeItem: (e) => {
|
|
222
|
-
const t =
|
|
223
|
-
|
|
222
|
+
const t = l.items.filter((n) => n.value !== e);
|
|
223
|
+
l.items = t;
|
|
224
224
|
},
|
|
225
225
|
appendItem: (e) => {
|
|
226
|
-
|
|
226
|
+
l.visible || (l.visible = !0), !l.items.find((n) => n.value == e.value) && l.items.push(e);
|
|
227
227
|
},
|
|
228
228
|
setActiveItem: (e) => {
|
|
229
|
-
|
|
229
|
+
l.activeItem = e;
|
|
230
230
|
},
|
|
231
231
|
setConfig: (e) => {
|
|
232
|
-
|
|
232
|
+
l.config = e;
|
|
233
233
|
},
|
|
234
234
|
setProjects: (e) => {
|
|
235
|
-
|
|
235
|
+
l.projects = e;
|
|
236
236
|
},
|
|
237
237
|
setProjectConfig: (e) => {
|
|
238
|
-
|
|
238
|
+
l.projectConfig = e;
|
|
239
239
|
},
|
|
240
240
|
setActiveProject: (e) => {
|
|
241
|
-
|
|
241
|
+
l.activeProject = e;
|
|
242
242
|
},
|
|
243
243
|
setUserInfo: (e) => {
|
|
244
|
-
|
|
244
|
+
l.userInfo = e;
|
|
245
245
|
},
|
|
246
246
|
setSearchConfig: (e) => {
|
|
247
|
-
|
|
247
|
+
l.searchConfig = e;
|
|
248
248
|
},
|
|
249
249
|
triggerEventListener: (e, t, n) => {
|
|
250
250
|
var i;
|
|
251
|
-
const s =
|
|
251
|
+
const s = l.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
|
|
252
252
|
for (const r in s) {
|
|
253
253
|
const o = s[r];
|
|
254
254
|
o.type === e && a.push(
|
|
@@ -261,9 +261,9 @@ const be = (e) => new Promise((t) => {
|
|
|
261
261
|
},
|
|
262
262
|
addEventListener: (e, t) => {
|
|
263
263
|
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
|
|
264
|
-
|
|
264
|
+
l.eventListeners[n] && delete l.eventListeners[n];
|
|
265
265
|
};
|
|
266
|
-
return
|
|
266
|
+
return l.eventListeners[n] = {
|
|
267
267
|
type: e,
|
|
268
268
|
handler: async (c) => {
|
|
269
269
|
try {
|
|
@@ -277,12 +277,12 @@ const be = (e) => new Promise((t) => {
|
|
|
277
277
|
remove: s
|
|
278
278
|
};
|
|
279
279
|
}
|
|
280
|
-
}, g =
|
|
280
|
+
}, g = T({
|
|
281
281
|
theme: "default",
|
|
282
282
|
items: [],
|
|
283
283
|
collapse: !1,
|
|
284
284
|
eventListeners: {}
|
|
285
|
-
}),
|
|
285
|
+
}), H = {
|
|
286
286
|
setItems: (e) => {
|
|
287
287
|
g.items = e;
|
|
288
288
|
},
|
|
@@ -330,11 +330,11 @@ const be = (e) => new Promise((t) => {
|
|
|
330
330
|
remove: s
|
|
331
331
|
};
|
|
332
332
|
}
|
|
333
|
-
}, A =
|
|
333
|
+
}, A = T({
|
|
334
334
|
theme: "default",
|
|
335
335
|
items: [],
|
|
336
336
|
eventListeners: {}
|
|
337
|
-
}),
|
|
337
|
+
}), U = {
|
|
338
338
|
setItems: (e) => {
|
|
339
339
|
A.items = e;
|
|
340
340
|
},
|
|
@@ -384,12 +384,12 @@ const be = (e) => new Promise((t) => {
|
|
|
384
384
|
remove: s
|
|
385
385
|
};
|
|
386
386
|
}
|
|
387
|
-
},
|
|
387
|
+
}, P = T({
|
|
388
388
|
eventListeners: {}
|
|
389
389
|
}), Ce = {
|
|
390
390
|
triggerEventListener: (e, t, n) => {
|
|
391
391
|
var i;
|
|
392
|
-
const s =
|
|
392
|
+
const s = P.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
|
|
393
393
|
for (const r in s) {
|
|
394
394
|
const o = s[r];
|
|
395
395
|
o.type === e && a.push(
|
|
@@ -402,9 +402,9 @@ const be = (e) => new Promise((t) => {
|
|
|
402
402
|
},
|
|
403
403
|
addEventListener: (e, t) => {
|
|
404
404
|
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
|
|
405
|
-
|
|
405
|
+
P.eventListeners[n] && delete P.eventListeners[n];
|
|
406
406
|
};
|
|
407
|
-
return
|
|
407
|
+
return P.eventListeners[n] = {
|
|
408
408
|
type: e,
|
|
409
409
|
handler: async (c) => {
|
|
410
410
|
try {
|
|
@@ -418,24 +418,29 @@ const be = (e) => new Promise((t) => {
|
|
|
418
418
|
remove: s
|
|
419
419
|
};
|
|
420
420
|
}
|
|
421
|
-
},
|
|
421
|
+
}, B = T({
|
|
422
422
|
visible: !1,
|
|
423
423
|
style: {}
|
|
424
424
|
}), Oe = {
|
|
425
425
|
set: (e, t) => {
|
|
426
|
-
|
|
426
|
+
B.visible = e, t || (t = {}), t.transition || (t.transition = "all 0.3s"), t && (B.style = t);
|
|
427
427
|
}
|
|
428
428
|
}, Fe = {
|
|
429
|
+
nav: l,
|
|
430
|
+
menu: g,
|
|
431
|
+
tab: A,
|
|
432
|
+
overlay: B,
|
|
433
|
+
iframeView: P,
|
|
429
434
|
visible: w(!0)
|
|
430
435
|
}, G = {
|
|
431
|
-
nav:
|
|
432
|
-
menu:
|
|
433
|
-
tab:
|
|
436
|
+
nav: j,
|
|
437
|
+
menu: H,
|
|
438
|
+
tab: U,
|
|
434
439
|
overlay: Oe,
|
|
435
440
|
iframeView: Ce,
|
|
436
441
|
setVisible: (e) => Fe.visible.value = e,
|
|
437
442
|
setTheme: (e) => {
|
|
438
|
-
|
|
443
|
+
j.setTheme(e), H.setTheme(e), U.setTheme(e);
|
|
439
444
|
}
|
|
440
445
|
}, re = (e, t) => {
|
|
441
446
|
const n = e.__vccOpts || e;
|
|
@@ -444,9 +449,9 @@ const be = (e) => new Promise((t) => {
|
|
|
444
449
|
return n;
|
|
445
450
|
};
|
|
446
451
|
var J;
|
|
447
|
-
const
|
|
452
|
+
const $ = typeof window < "u", Re = (e) => typeof e == "string", Ne = () => {
|
|
448
453
|
};
|
|
449
|
-
|
|
454
|
+
$ && ((J = window == null ? void 0 : window.navigator) != null && J.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
450
455
|
function ae(e) {
|
|
451
456
|
return typeof e == "function" ? e() : I(e);
|
|
452
457
|
}
|
|
@@ -457,27 +462,27 @@ function ie(e) {
|
|
|
457
462
|
return ue() ? (de(e), !0) : !1;
|
|
458
463
|
}
|
|
459
464
|
function ke(e, t = !0) {
|
|
460
|
-
|
|
465
|
+
fe() ? pe(e) : t ? e() : ne(e);
|
|
461
466
|
}
|
|
462
467
|
function oe(e) {
|
|
463
468
|
var t;
|
|
464
469
|
const n = ae(e);
|
|
465
470
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
466
471
|
}
|
|
467
|
-
const xe =
|
|
472
|
+
const xe = $ ? window : void 0, Ve = $ ? window.document : void 0;
|
|
468
473
|
function qe(...e) {
|
|
469
474
|
let t, n, s, c;
|
|
470
475
|
if (Re(e[0]) || Array.isArray(e[0]) ? ([n, s, c] = e, t = xe) : [t, n, s, c] = e, !t)
|
|
471
476
|
return Ne;
|
|
472
477
|
Array.isArray(n) || (n = [n]), Array.isArray(s) || (s = [s]);
|
|
473
478
|
const a = [], i = () => {
|
|
474
|
-
a.forEach((
|
|
475
|
-
}, r = (
|
|
476
|
-
i(),
|
|
477
|
-
}, { immediate: !0, flush: "post" }),
|
|
479
|
+
a.forEach((u) => u()), a.length = 0;
|
|
480
|
+
}, r = (u, y, p, L) => (u.addEventListener(y, p, L), () => u.removeEventListener(y, p, L)), o = M(() => [oe(t), ae(c)], ([u, y]) => {
|
|
481
|
+
i(), u && a.push(...n.flatMap((p) => s.map((L) => r(u, p, L, y))));
|
|
482
|
+
}, { immediate: !0, flush: "post" }), f = () => {
|
|
478
483
|
o(), i();
|
|
479
484
|
};
|
|
480
|
-
return ie(
|
|
485
|
+
return ie(f), f;
|
|
481
486
|
}
|
|
482
487
|
function Qe(e, t = !1) {
|
|
483
488
|
const n = w(), s = () => n.value = !!e();
|
|
@@ -538,27 +543,27 @@ function Be(e, t = {}) {
|
|
|
538
543
|
} else
|
|
539
544
|
return !1;
|
|
540
545
|
return !1;
|
|
541
|
-
}), [o,
|
|
542
|
-
async function
|
|
543
|
-
r.value && (n != null && n[
|
|
546
|
+
}), [o, f, u, , y] = i;
|
|
547
|
+
async function p() {
|
|
548
|
+
r.value && (n != null && n[u] && await n[f](), a.value = !1);
|
|
544
549
|
}
|
|
545
550
|
async function L() {
|
|
546
551
|
if (!r.value)
|
|
547
552
|
return;
|
|
548
|
-
await
|
|
553
|
+
await p();
|
|
549
554
|
const S = oe(c);
|
|
550
555
|
S && (await S[o](), a.value = !0);
|
|
551
556
|
}
|
|
552
557
|
async function le() {
|
|
553
|
-
a.value ? await
|
|
558
|
+
a.value ? await p() : await L();
|
|
554
559
|
}
|
|
555
560
|
return n && qe(n, y, () => {
|
|
556
|
-
a.value = !!(n != null && n[
|
|
557
|
-
}, !1), s && ie(
|
|
561
|
+
a.value = !!(n != null && n[u]);
|
|
562
|
+
}, !1), s && ie(p), {
|
|
558
563
|
isSupported: r,
|
|
559
564
|
isFullscreen: a,
|
|
560
565
|
enter: L,
|
|
561
|
-
exit:
|
|
566
|
+
exit: p,
|
|
562
567
|
toggle: le
|
|
563
568
|
};
|
|
564
569
|
}
|
|
@@ -567,7 +572,7 @@ var Z;
|
|
|
567
572
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
568
573
|
})(Z || (Z = {}));
|
|
569
574
|
var $e = Object.defineProperty, ee = Object.getOwnPropertySymbols, ze = Object.prototype.hasOwnProperty, We = Object.prototype.propertyIsEnumerable, te = (e, t, n) => t in e ? $e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, je = (e, t) => {
|
|
570
|
-
for (var n in t
|
|
575
|
+
for (var n in t)
|
|
571
576
|
ze.call(t, n) && te(e, n, t[n]);
|
|
572
577
|
if (ee)
|
|
573
578
|
for (var n of ee(t))
|
|
@@ -630,12 +635,12 @@ const Ue = ["src", "entry", "name"], Ge = /* @__PURE__ */ x({
|
|
|
630
635
|
__name: "das-micro-apps",
|
|
631
636
|
setup(e) {
|
|
632
637
|
const t = w(null), n = async (a, i) => {
|
|
633
|
-
const r =
|
|
638
|
+
const r = m.value.find((p) => p.name === i);
|
|
634
639
|
if (!r) return;
|
|
635
|
-
r.dom = a.target, await ne(), await new Promise((
|
|
640
|
+
r.dom = a.target, await ne(), await new Promise((p) => setTimeout(p, 50));
|
|
636
641
|
const o = () => {
|
|
637
|
-
const
|
|
638
|
-
return
|
|
642
|
+
const p = t.value.getBoundingClientRect() || {};
|
|
643
|
+
return p.width = t.value.clientWidth, p.height = t.value.clientHeight, p;
|
|
639
644
|
};
|
|
640
645
|
d.sendMessageToMicroApp(i, "onLoaded", {
|
|
641
646
|
href: location.href,
|
|
@@ -643,20 +648,20 @@ const Ue = ["src", "entry", "name"], Ge = /* @__PURE__ */ x({
|
|
|
643
648
|
entry: r.entry,
|
|
644
649
|
name: r.name
|
|
645
650
|
});
|
|
646
|
-
const { dom:
|
|
647
|
-
d.triggerMicroAppLifeCycleListener("onLoaded",
|
|
651
|
+
const { dom: f, ...u } = r;
|
|
652
|
+
d.triggerMicroAppLifeCycleListener("onLoaded", u), new ResizeObserver(() => {
|
|
648
653
|
d.sendMessageToMicroApp(i, "resize", o());
|
|
649
654
|
}).observe(t.value), d.sendMessageToMicroApp(i, "setProxyMessageStatus", { visible: !0, parentHref: location.href }), d.sendMessageToMicroApp(i, "setProxSsoStatus", { visible: !0, parentHref: location.href });
|
|
650
655
|
}, s = (a, i) => {
|
|
651
|
-
const r =
|
|
656
|
+
const r = m.value.find((u) => u.name === i);
|
|
652
657
|
if (!r) return;
|
|
653
|
-
const { dom: o, ...
|
|
654
|
-
d.sendMessageToMicroApp(i, "onActivated"), d.triggerMicroAppLifeCycleListener("onActivated",
|
|
658
|
+
const { dom: o, ...f } = r;
|
|
659
|
+
d.sendMessageToMicroApp(i, "onActivated"), d.triggerMicroAppLifeCycleListener("onActivated", f);
|
|
655
660
|
}, c = (a, i) => {
|
|
656
|
-
const r =
|
|
661
|
+
const r = m.value.find((u) => u.name === i);
|
|
657
662
|
if (!r) return;
|
|
658
|
-
const { dom: o, ...
|
|
659
|
-
d.sendMessageToMicroApp(i, "onDeactivated"), d.triggerMicroAppLifeCycleListener("onDeactivated",
|
|
663
|
+
const { dom: o, ...f } = r;
|
|
664
|
+
d.sendMessageToMicroApp(i, "onDeactivated"), d.triggerMicroAppLifeCycleListener("onDeactivated", f);
|
|
660
665
|
};
|
|
661
666
|
return (a, i) => (E(), D(
|
|
662
667
|
"div",
|
|
@@ -667,10 +672,10 @@ const Ue = ["src", "entry", "name"], Ge = /* @__PURE__ */ x({
|
|
|
667
672
|
},
|
|
668
673
|
[
|
|
669
674
|
(E(!0), D(
|
|
670
|
-
|
|
675
|
+
z,
|
|
671
676
|
null,
|
|
672
|
-
|
|
673
|
-
|
|
677
|
+
me(I(m), (r) => (E(), D(
|
|
678
|
+
z,
|
|
674
679
|
null,
|
|
675
680
|
[
|
|
676
681
|
r.loaded ? ve((E(), se(Je, {
|
|
@@ -682,8 +687,8 @@ const Ue = ["src", "entry", "name"], Ge = /* @__PURE__ */ x({
|
|
|
682
687
|
onOnActivated: (o) => s(o, r.name),
|
|
683
688
|
onOnDeactivated: (o) => c(o, r.name)
|
|
684
689
|
}, null, 8, ["src", "name", "actived", "onOnLoaded", "onOnActivated", "onOnDeactivated"])), [
|
|
685
|
-
[
|
|
686
|
-
]) :
|
|
690
|
+
[he, r.actived]
|
|
691
|
+
]) : Ae("v-if", !0)
|
|
687
692
|
],
|
|
688
693
|
64
|
|
689
694
|
/* STABLE_FRAGMENT */
|
|
@@ -718,23 +723,23 @@ const Ue = ["src", "entry", "name"], Ge = /* @__PURE__ */ x({
|
|
|
718
723
|
"transition-config": s.value,
|
|
719
724
|
"router-view-visible": n.value
|
|
720
725
|
}, c.value), {
|
|
721
|
-
header:
|
|
726
|
+
header: C(() => [
|
|
722
727
|
V(a.$slots, "header", {}, () => [
|
|
723
|
-
|
|
728
|
+
O(I(Me))
|
|
724
729
|
])
|
|
725
730
|
]),
|
|
726
|
-
aside:
|
|
731
|
+
aside: C(() => [
|
|
727
732
|
V(a.$slots, "aside", {}, () => [
|
|
728
|
-
|
|
733
|
+
O(I(Le), { menuAttr: a.menuAttr }, null, 8, ["menuAttr"])
|
|
729
734
|
])
|
|
730
735
|
]),
|
|
731
|
-
tab:
|
|
736
|
+
tab: C(() => [
|
|
732
737
|
V(a.$slots, "tab", {}, () => [
|
|
733
|
-
|
|
738
|
+
O(I(_e), { tabsAttr: a.tabsAttr }, null, 8, ["tabsAttr"])
|
|
734
739
|
])
|
|
735
740
|
]),
|
|
736
|
-
default:
|
|
737
|
-
|
|
741
|
+
default: C(() => [
|
|
742
|
+
O(Xe)
|
|
738
743
|
]),
|
|
739
744
|
_: 3
|
|
740
745
|
/* FORWARDED */
|
|
@@ -751,9 +756,9 @@ const Ue = ["src", "entry", "name"], Ge = /* @__PURE__ */ x({
|
|
|
751
756
|
}
|
|
752
757
|
}), Ye = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.startsWith(n)) ? e : `/${e}`, nt = (e, t) => {
|
|
753
758
|
if (!(e != null && e.microApps) || !Array.isArray(e.microApps)) return;
|
|
754
|
-
window.__IN_DAS_MAIN_APP = !0, e != null && e.microAppRouterPrefix && (
|
|
759
|
+
window.__IN_DAS_MAIN_APP = !0, e != null && e.microAppRouterPrefix && (W.value = e.microAppRouterPrefix), m.value = (e.microApps || []).filter((c) => !!c.name).map((c) => ({ ...c, entry: Ye(c.entry || c.name) })), t == null || t.addRoute({
|
|
755
760
|
name: "das-micro-app",
|
|
756
|
-
path: `${
|
|
761
|
+
path: `${W.value}/:pathMatch(.*)*`,
|
|
757
762
|
component: ce,
|
|
758
763
|
meta: { isMicroApp: !0, keepAlive: !0 }
|
|
759
764
|
}), d.addEventListenerFromMicroApp("bodyOverlay", (c) => {
|
|
@@ -796,7 +801,7 @@ const Ue = ["src", "entry", "name"], Ge = /* @__PURE__ */ x({
|
|
|
796
801
|
c.value = !1;
|
|
797
802
|
return;
|
|
798
803
|
}
|
|
799
|
-
const { path: r, query: o, params:
|
|
804
|
+
const { path: r, query: o, params: f, meta: u } = i;
|
|
800
805
|
if (a.value.includes(i.path)) {
|
|
801
806
|
a.value = "";
|
|
802
807
|
return;
|
|
@@ -806,37 +811,37 @@ const Ue = ["src", "entry", "name"], Ge = /* @__PURE__ */ x({
|
|
|
806
811
|
route: {
|
|
807
812
|
path: r,
|
|
808
813
|
query: { ...o, microAppName: e.microAppName },
|
|
809
|
-
params:
|
|
810
|
-
meta:
|
|
814
|
+
params: f,
|
|
815
|
+
meta: u
|
|
811
816
|
}
|
|
812
817
|
});
|
|
813
818
|
}
|
|
814
819
|
), d.addEventListenerFromMainApp("router", async (i) => {
|
|
815
|
-
var
|
|
816
|
-
const { cmd: r, route: o, microAppName:
|
|
817
|
-
a.value = ("/" +
|
|
820
|
+
var u;
|
|
821
|
+
const { cmd: r, route: o, microAppName: f = "" } = i.data;
|
|
822
|
+
a.value = ("/" + f + o.path).replace(/\/\//g, "/"), (u = t == null ? void 0 : t[r]) == null || u.call(t, o);
|
|
818
823
|
}), d.addEventListenerFromMainApp("onLoaded", (i) => {
|
|
819
824
|
const { href: r, microAppContainerRect: o } = i.data;
|
|
820
825
|
window.__IN_DAS_MICRO_APP = !0, window.__DAS_MICRO_APP_NAME = e.microAppName, window.__DAS_MAIN_APP_HREF = r, window.__DAS_MICRO_APP_CONTAINER_RECT = o;
|
|
821
826
|
}), d.addEventListenerFromMainApp("onDeactivated", (i) => {
|
|
822
|
-
const { name: r = "", path: o, params:
|
|
827
|
+
const { name: r = "", path: o, params: f = {}, query: u = {} } = t.currentRoute.value;
|
|
823
828
|
c.value = !0, t == null || t.push({
|
|
824
829
|
name: n,
|
|
825
|
-
query: { microAppName: e.microAppName, fromQuery: JSON.stringify(
|
|
826
|
-
params:
|
|
830
|
+
query: { microAppName: e.microAppName, fromQuery: JSON.stringify(u), fromPath: o },
|
|
831
|
+
params: f
|
|
827
832
|
});
|
|
828
833
|
}), d.addEventListenerFromMainApp("onActivated", (i) => {
|
|
829
|
-
const { name: r = "", params: o = {}, query:
|
|
830
|
-
s.value = !0, t == null || t.push({ path:
|
|
834
|
+
const { name: r = "", params: o = {}, query: f = {} } = t.currentRoute.value, { fromPath: u = "", fromQuery: y = "{}" } = f || {};
|
|
835
|
+
s.value = !0, t == null || t.push({ path: u, query: JSON.parse(y), params: o });
|
|
831
836
|
}), d.addEventListenerFromMainApp("sessionStorage", (i) => {
|
|
832
|
-
const { cmd: r, key: o, value:
|
|
833
|
-
r === "setItem" && window.sessionStorage.setItem(o,
|
|
837
|
+
const { cmd: r, key: o, value: f } = i.data;
|
|
838
|
+
r === "setItem" && window.sessionStorage.setItem(o, f), r === "getItem" && window.sessionStorage.getItem(o), r === "removeItem" && window.sessionStorage.removeItem(o), r === "clear" && window.sessionStorage.clear();
|
|
834
839
|
}), d.addEventListenerFromMainApp("route", (i) => {
|
|
835
840
|
const { cmd: r, path: o } = i.data;
|
|
836
|
-
r === "reload" && (
|
|
837
|
-
|
|
838
|
-
}, 300)), r === "unload" && (
|
|
839
|
-
|
|
841
|
+
r === "reload" && (F.value.push(o), R.value = !1, setTimeout(() => {
|
|
842
|
+
R.value = !0, F.value = [];
|
|
843
|
+
}, 300)), r === "unload" && (F.value.push(o), R.value = !1, setTimeout(() => {
|
|
844
|
+
R.value = !0, F.value = [];
|
|
840
845
|
}, 100));
|
|
841
846
|
});
|
|
842
847
|
};
|
|
Binary file
|
package/index-D72GvFXQ.js
DELETED
package/index-NR-7IC-G.js.gz
DELETED
|
Binary file
|
package/index-afISleAK.js.gz
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|