@das-fed/web 1.0.2 → 1.0.3
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.js +683 -315
- package/index.umd.cjs +1 -1
- package/package.json +3 -1
- package/style.css +2 -2
package/index.js
CHANGED
|
@@ -1,156 +1,365 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useRoute as
|
|
3
|
-
|
|
1
|
+
import { ref as A, computed as l, reactive as V, defineComponent as P, watch as R, resolveComponent as fe, openBlock as p, createElementBlock as w, createVNode as y, Transition as S, withCtx as L, withDirectives as z, createElementVNode as j, normalizeStyle as pe, vShow as Q, normalizeProps as B, guardReactiveProps as O, renderSlot as T, createCommentVNode as k, createBlock as G, KeepAlive as ge, unref as E, resolveDynamicComponent as ae, onBeforeMount as he, onMounted as be, onUnmounted as _e, Fragment as se, renderList as Ie, createApp as Ae } from "vue";
|
|
2
|
+
import { useRoute as ye, createRouter as Le, createWebHistory as we } from "vue-router";
|
|
3
|
+
import { createCeNav as Me, createCeMenu as Ce, createCeTabs as Te } from "@das-fed/web-components";
|
|
4
|
+
const F = A("light"), W = A({
|
|
4
5
|
light: {},
|
|
5
6
|
dark: {}
|
|
6
|
-
}),
|
|
7
|
+
}), K = A({
|
|
7
8
|
light: {},
|
|
8
9
|
dark: {}
|
|
9
|
-
}),
|
|
10
|
+
}), ke = "dasTheme", H = "das-theme", De = (e) => {
|
|
10
11
|
let t = {
|
|
11
12
|
light: {},
|
|
12
13
|
dark: {}
|
|
13
14
|
};
|
|
14
15
|
if (!e)
|
|
15
16
|
return t;
|
|
16
|
-
const { light:
|
|
17
|
-
t.light =
|
|
18
|
-
for (const
|
|
19
|
-
const
|
|
20
|
-
if (typeof
|
|
21
|
-
for (const
|
|
22
|
-
t[
|
|
17
|
+
const { light: n, dark: s, ...a } = e || {};
|
|
18
|
+
t.light = n || {}, t.dark = s || {};
|
|
19
|
+
for (const o in a) {
|
|
20
|
+
const i = a[o];
|
|
21
|
+
if (typeof i == "string" && (t.light[o] = i), typeof i == "object")
|
|
22
|
+
for (const r in i)
|
|
23
|
+
t[r][o] = i[r];
|
|
23
24
|
}
|
|
24
25
|
return t;
|
|
25
26
|
};
|
|
26
|
-
function
|
|
27
|
-
const t = "das-global-theme",
|
|
28
|
-
if (!document.getElementById(
|
|
29
|
-
const
|
|
30
|
-
|
|
27
|
+
function Ee(e) {
|
|
28
|
+
const t = "das-global-theme", n = "das-custom-theme";
|
|
29
|
+
if (!document.getElementById(n)) {
|
|
30
|
+
const a = document.createElement("style");
|
|
31
|
+
a.appendChild(document.createTextNode("")), a.setAttribute("id", n), document.head.appendChild(a);
|
|
31
32
|
}
|
|
32
33
|
if (!document.getElementById(t)) {
|
|
33
|
-
const
|
|
34
|
-
|
|
34
|
+
const a = document.createElement("style");
|
|
35
|
+
a.appendChild(document.createTextNode("")), a.setAttribute("id", t), document.head.appendChild(a);
|
|
35
36
|
}
|
|
36
37
|
e || (e = "custom");
|
|
37
|
-
let s = document.getElementById(
|
|
38
|
+
let s = document.getElementById(n);
|
|
38
39
|
return e === "global" && (s = document.getElementById(t)), s.sheet;
|
|
39
40
|
}
|
|
40
|
-
const
|
|
41
|
+
const oe = (e, t) => {
|
|
41
42
|
t || (t = "custom");
|
|
42
|
-
const
|
|
43
|
-
for (const
|
|
44
|
-
const
|
|
45
|
-
for (const
|
|
46
|
-
const
|
|
47
|
-
|
|
43
|
+
const n = Ee(t), s = De(e);
|
|
44
|
+
for (const o in s) {
|
|
45
|
+
const i = s[o];
|
|
46
|
+
for (const r in i) {
|
|
47
|
+
const u = i[r], g = `${H}-${o}`;
|
|
48
|
+
n.insertRule(`.${g} { ${r}:${u} } `, n.cssRules.length);
|
|
48
49
|
}
|
|
49
|
-
t === "global" && (
|
|
50
|
+
t === "global" && (K.value[o] || (K.value[o] = {}), K.value[o] = { ...K.value[o], ...i }), t === "custom" && (W.value[o] || (W.value[o] = {}), W.value[o] = { ...W.value[o], ...i });
|
|
50
51
|
}
|
|
51
|
-
const
|
|
52
|
-
document.body.classList.contains(
|
|
53
|
-
},
|
|
52
|
+
const a = `${H}-${F.value}`;
|
|
53
|
+
document.body.classList.contains(a) || document.body.classList.add(a);
|
|
54
|
+
}, $e = async (e) => {
|
|
54
55
|
var s;
|
|
55
|
-
const t = window[
|
|
56
|
-
t &&
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
59
|
-
const
|
|
60
|
-
for (const
|
|
61
|
-
|
|
56
|
+
const t = window[ke];
|
|
57
|
+
t && oe(t, "global");
|
|
58
|
+
const n = (s = e == null ? void 0 : e.theme) == null ? void 0 : s.glob;
|
|
59
|
+
if (n) {
|
|
60
|
+
const a = Object.values(n).map((o) => o.default).filter((o) => !!o).flat();
|
|
61
|
+
for (const o of a)
|
|
62
|
+
oe(o);
|
|
62
63
|
}
|
|
63
|
-
},
|
|
64
|
-
document.body.classList.add(`${
|
|
65
|
-
},
|
|
66
|
-
var t,
|
|
67
|
-
return ((
|
|
68
|
-
}),
|
|
69
|
-
const
|
|
70
|
-
for (const
|
|
71
|
-
|
|
72
|
-
},
|
|
64
|
+
}, yt = (e) => {
|
|
65
|
+
document.body.classList.add(`${H}-light`), e === "light" && document.body.classList.remove(`${H}-${F.value}`), F.value = e, document.body.classList.add(`${H}-${F.value}`);
|
|
66
|
+
}, Re = (e) => l(() => {
|
|
67
|
+
var t, n, s, a;
|
|
68
|
+
return ((n = (t = K.value) == null ? void 0 : t[F.value]) == null ? void 0 : n[e]) || ((a = (s = W.value) == null ? void 0 : s[F.value]) == null ? void 0 : a[e]) || e;
|
|
69
|
+
}), Lt = (e) => `var(${e})`, wt = Re, ce = V({}), le = V({}), ee = A("zh-CN"), Ve = "dasI18n", ie = (e, t) => {
|
|
70
|
+
const n = t === "global", s = !n;
|
|
71
|
+
for (const a in e)
|
|
72
|
+
n && (le[a] = e[a]), s && (ce[a] = e[a]);
|
|
73
|
+
}, Pe = async (e) => {
|
|
73
74
|
var s;
|
|
74
|
-
const t = window[
|
|
75
|
-
t &&
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
78
|
-
const
|
|
79
|
-
for (const
|
|
80
|
-
|
|
75
|
+
const t = window[Ve];
|
|
76
|
+
t && ie(t, "global");
|
|
77
|
+
const n = (s = e == null ? void 0 : e.i18n) == null ? void 0 : s.glob;
|
|
78
|
+
if (n) {
|
|
79
|
+
const a = Object.values(n).map((o) => o.default).filter((o) => !!o).flat();
|
|
80
|
+
for (const o of a)
|
|
81
|
+
ie(o);
|
|
81
82
|
}
|
|
82
|
-
},
|
|
83
|
-
const
|
|
84
|
-
if (
|
|
83
|
+
}, Se = (e, ...t) => l(() => {
|
|
84
|
+
const n = le[e] || ce[e] || e;
|
|
85
|
+
if (n === e)
|
|
85
86
|
return e;
|
|
86
|
-
let s =
|
|
87
|
-
return t.map((
|
|
88
|
-
s = s.replace(`$${
|
|
87
|
+
let s = n[ee.value];
|
|
88
|
+
return t.map((a, o) => {
|
|
89
|
+
s = s.replace(`$${o}`, a);
|
|
89
90
|
}), s;
|
|
90
|
-
}),
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
91
|
+
}), je = Se, Mt = (e, ...t) => je(e, ...t).value, Ct = (e) => {
|
|
92
|
+
ee.value = e;
|
|
93
|
+
}, Tt = () => ee, m = V({
|
|
94
|
+
logo: "",
|
|
95
|
+
items: [],
|
|
96
|
+
projects: [],
|
|
97
|
+
userInfo: {},
|
|
98
|
+
visible: !1,
|
|
99
|
+
// activeItem: '',
|
|
100
|
+
// activeProject: {},
|
|
101
|
+
eventListeners: {}
|
|
102
|
+
}), xe = {
|
|
103
|
+
show: () => {
|
|
104
|
+
m.visible = !0;
|
|
105
|
+
},
|
|
106
|
+
hide: () => {
|
|
107
|
+
m.visible = !1;
|
|
108
|
+
},
|
|
109
|
+
setLogo: (e) => {
|
|
110
|
+
m.logo = e;
|
|
111
|
+
},
|
|
112
|
+
setItems: (e) => {
|
|
113
|
+
m.visible || (m.visible = !0), m.items = e;
|
|
114
|
+
},
|
|
115
|
+
getItems: () => m.items,
|
|
116
|
+
removeItem: (e) => {
|
|
117
|
+
const t = m.items.filter((n) => n.value !== e);
|
|
118
|
+
m.items = t;
|
|
119
|
+
},
|
|
120
|
+
appendItem: (e) => {
|
|
121
|
+
m.visible || (m.visible = !0), !m.items.find((n) => n.value == e.value) && m.items.push(e);
|
|
122
|
+
},
|
|
123
|
+
setActiveItem: (e) => {
|
|
124
|
+
m.activeItem = e;
|
|
125
|
+
},
|
|
126
|
+
setProjects: (e) => {
|
|
127
|
+
m.projects = e;
|
|
128
|
+
},
|
|
129
|
+
setActiveProject: (e) => {
|
|
130
|
+
m.activeProject = e;
|
|
131
|
+
},
|
|
132
|
+
setUserInfo: (e) => {
|
|
133
|
+
m.userInfo = e;
|
|
134
|
+
},
|
|
135
|
+
triggerEventListener: (e, t, n) => {
|
|
136
|
+
var o;
|
|
137
|
+
const s = m.eventListeners, { autoRemove: a = !1 } = n || {};
|
|
138
|
+
for (const i in s) {
|
|
139
|
+
const r = s[i];
|
|
140
|
+
r.type === e && ((o = r == null ? void 0 : r.handler) == null || o.call(r, t).then(() => {
|
|
141
|
+
a && r.remove();
|
|
142
|
+
}));
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
addEventListener: (e, t) => {
|
|
146
|
+
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
|
|
147
|
+
m.eventListeners[n] && delete m.eventListeners[n];
|
|
148
|
+
};
|
|
149
|
+
return m.eventListeners[n] = {
|
|
150
|
+
type: e,
|
|
151
|
+
handler: async (a) => await t(a),
|
|
152
|
+
remove: s
|
|
153
|
+
}, {
|
|
154
|
+
remove: s
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
}, C = V({
|
|
158
|
+
items: [],
|
|
159
|
+
eventListeners: {}
|
|
160
|
+
}), Fe = {
|
|
161
|
+
setItems: (e) => {
|
|
162
|
+
C.items = e;
|
|
163
|
+
},
|
|
164
|
+
getItems: () => C.items,
|
|
165
|
+
setActiveItem: (e) => {
|
|
166
|
+
C.activeItem = e;
|
|
167
|
+
},
|
|
168
|
+
triggerEventListener: (e, t, n) => {
|
|
169
|
+
var o;
|
|
170
|
+
const s = C.eventListeners, { autoRemove: a = !1 } = n || {};
|
|
171
|
+
for (const i in s) {
|
|
172
|
+
const r = s[i];
|
|
173
|
+
r.type === e && ((o = r == null ? void 0 : r.handler) == null || o.call(r, t).then(() => {
|
|
174
|
+
a && r.remove();
|
|
175
|
+
}));
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
addEventListener: (e, t) => {
|
|
179
|
+
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
|
|
180
|
+
C.eventListeners[n] && delete C.eventListeners[n];
|
|
181
|
+
};
|
|
182
|
+
return C.eventListeners[n] = {
|
|
183
|
+
type: e,
|
|
184
|
+
handler: async (a) => await t(a),
|
|
185
|
+
remove: s
|
|
186
|
+
}, {
|
|
187
|
+
remove: s
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
}, b = V({
|
|
191
|
+
items: [],
|
|
192
|
+
eventListeners: {}
|
|
193
|
+
}), Ne = {
|
|
194
|
+
setItems: (e) => {
|
|
195
|
+
b.items = e;
|
|
196
|
+
},
|
|
197
|
+
getItems: () => b.items,
|
|
198
|
+
removeItem: (e) => {
|
|
199
|
+
const t = b.items.filter((n) => n.value !== e);
|
|
200
|
+
b.items = t;
|
|
201
|
+
},
|
|
202
|
+
appendItem: (e) => {
|
|
203
|
+
b.items.find((n) => n.value == e.value) || b.items.push(e);
|
|
204
|
+
},
|
|
205
|
+
setActiveItem: (e) => {
|
|
206
|
+
b.activeItem = e;
|
|
207
|
+
},
|
|
208
|
+
triggerEventListener: (e, t, n) => {
|
|
209
|
+
var o;
|
|
210
|
+
const s = b.eventListeners, { autoRemove: a = !1 } = n || {};
|
|
211
|
+
for (const i in s) {
|
|
212
|
+
const r = s[i];
|
|
213
|
+
r.type === e && ((o = r == null ? void 0 : r.handler) == null || o.call(r, t).then(() => {
|
|
214
|
+
a && r.remove();
|
|
215
|
+
}));
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
addEventListener: (e, t) => {
|
|
219
|
+
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
|
|
220
|
+
b.eventListeners[n] && delete b.eventListeners[n];
|
|
221
|
+
};
|
|
222
|
+
return b.eventListeners[n] = {
|
|
223
|
+
type: e,
|
|
224
|
+
handler: async (a) => await t(a),
|
|
225
|
+
remove: s
|
|
226
|
+
}, {
|
|
227
|
+
remove: s
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
}, Z = V({
|
|
231
|
+
visible: !1,
|
|
232
|
+
style: {}
|
|
233
|
+
}), Be = {
|
|
234
|
+
set: (e, t) => {
|
|
235
|
+
Z.visible = e, t && (Z.style = t);
|
|
236
|
+
}
|
|
237
|
+
}, f = {
|
|
238
|
+
nav: xe,
|
|
239
|
+
menu: Fe,
|
|
240
|
+
tab: Ne,
|
|
241
|
+
overlay: Be
|
|
242
|
+
}, U = {
|
|
243
|
+
nav: m,
|
|
244
|
+
menu: C,
|
|
245
|
+
tab: b,
|
|
246
|
+
overlay: Z
|
|
247
|
+
}, Oe = { class: "das-web-app-container" }, We = {
|
|
248
|
+
key: 0,
|
|
249
|
+
class: "das-web-app-header"
|
|
250
|
+
}, Ke = { class: "das-web-app-main" }, Ge = {
|
|
251
|
+
key: 0,
|
|
252
|
+
class: "aside"
|
|
253
|
+
}, He = { class: "das-web-app-main-container" }, Ue = {
|
|
254
|
+
key: 0,
|
|
255
|
+
class: "tab"
|
|
256
|
+
}, qe = { class: "das-web-app-main-router-view" }, ze = { style: { width: "100%", height: "100%" } }, Qe = {
|
|
257
|
+
class: "micro-app",
|
|
258
|
+
style: { height: "100%", width: "100%" }
|
|
259
|
+
}, Je = /* @__PURE__ */ P({
|
|
101
260
|
__name: "das-web-layout",
|
|
102
261
|
props: {
|
|
103
|
-
transitionConfig: {}
|
|
262
|
+
transitionConfig: {},
|
|
263
|
+
headerTransitionConfig: {},
|
|
264
|
+
asideTransitionConfig: {},
|
|
265
|
+
tabTransitionConfig: {},
|
|
266
|
+
routerViewVisible: { type: Boolean, default: !0 }
|
|
104
267
|
},
|
|
105
268
|
setup(e) {
|
|
106
|
-
const t = e,
|
|
269
|
+
const t = e, n = ye(), s = A(!1), a = A(!1), o = A(!1), i = l(() => t.routerViewVisible ?? !0), r = l(() => U.overlay.visible ?? !1), u = l(() => U.overlay.style ?? { backgroundColor: "rgba(0,0,0,0.5)" });
|
|
270
|
+
R(
|
|
271
|
+
() => n.meta,
|
|
272
|
+
(M) => {
|
|
273
|
+
const { showLayout: d = !0, showAside: c = !0, showTabs: v = !0 } = M;
|
|
274
|
+
let $ = !0, te = !0, ne = !0;
|
|
275
|
+
d !== !1 && (c === !1 && (te = !1), v === !1 && (ne = !1), s.value = $, a.value = te, o.value = ne);
|
|
276
|
+
}
|
|
277
|
+
);
|
|
278
|
+
const g = l(() => ({
|
|
107
279
|
"enter-active-class": "animate__animated animate__fadeInLeft",
|
|
108
280
|
...t.transitionConfig || {}
|
|
281
|
+
})), N = l(() => ({
|
|
282
|
+
"enter-active-class": "animate__animated animate__fadeInDown",
|
|
283
|
+
...t.headerTransitionConfig || {}
|
|
284
|
+
})), X = l(() => ({
|
|
285
|
+
"enter-active-class": "animate__animated animate__fadeInLeft",
|
|
286
|
+
...t.asideTransitionConfig || {}
|
|
287
|
+
})), Y = l(() => ({
|
|
288
|
+
"enter-active-class": "animate__animated animate__fadeIn",
|
|
289
|
+
...t.tabTransitionConfig || {}
|
|
109
290
|
}));
|
|
110
|
-
return (
|
|
111
|
-
const c =
|
|
112
|
-
return
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
291
|
+
return (M, d) => {
|
|
292
|
+
const c = fe("router-view");
|
|
293
|
+
return p(), w("div", Oe, [
|
|
294
|
+
y(S, { name: "overlay" }, {
|
|
295
|
+
default: L(() => [
|
|
296
|
+
z(j("div", {
|
|
297
|
+
class: "das-web-app-overlay",
|
|
298
|
+
style: pe(u.value)
|
|
299
|
+
}, null, 4), [
|
|
300
|
+
[Q, r.value]
|
|
301
|
+
])
|
|
302
|
+
]),
|
|
303
|
+
_: 1
|
|
304
|
+
}),
|
|
305
|
+
y(S, B(O(N.value)), {
|
|
306
|
+
default: L(() => [
|
|
307
|
+
s.value ? (p(), w("div", We, [
|
|
308
|
+
T(M.$slots, "header", {}, void 0, !0)
|
|
309
|
+
])) : k("", !0)
|
|
310
|
+
]),
|
|
311
|
+
_: 3
|
|
312
|
+
}, 16),
|
|
313
|
+
j("div", Ke, [
|
|
314
|
+
y(S, B(O(X.value)), {
|
|
315
|
+
default: L(() => [
|
|
316
|
+
a.value ? (p(), w("div", Ge, [
|
|
317
|
+
T(M.$slots, "aside", {}, void 0, !0)
|
|
318
|
+
])) : k("", !0)
|
|
123
319
|
]),
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
320
|
+
_: 3
|
|
321
|
+
}, 16),
|
|
322
|
+
j("div", He, [
|
|
323
|
+
y(S, B(O(Y.value)), {
|
|
324
|
+
default: L(() => [
|
|
325
|
+
o.value ? (p(), w("div", Ue, [
|
|
326
|
+
T(M.$slots, "tab", {}, void 0, !0)
|
|
327
|
+
])) : k("", !0)
|
|
328
|
+
]),
|
|
329
|
+
_: 3
|
|
330
|
+
}, 16),
|
|
331
|
+
j("div", qe, [
|
|
332
|
+
z(j("div", ze, [
|
|
333
|
+
T(M.$slots, "router-view", {}, () => [
|
|
334
|
+
y(c, null, {
|
|
335
|
+
default: L(({ Component: v }) => [
|
|
336
|
+
y(S, B(O(g.value)), {
|
|
337
|
+
default: L(() => [
|
|
338
|
+
(p(), G(ge, null, [
|
|
339
|
+
E(n).meta.keepAlive ? (p(), G(ae(v), {
|
|
340
|
+
key: E(n).path
|
|
341
|
+
})) : k("", !0)
|
|
342
|
+
], 1024))
|
|
343
|
+
]),
|
|
344
|
+
_: 2
|
|
345
|
+
}, 1040),
|
|
346
|
+
y(S, B(O(g.value)), {
|
|
347
|
+
default: L(() => [
|
|
348
|
+
E(n).meta.keepAlive ? k("", !0) : (p(), G(ae(v), { key: 0 }))
|
|
349
|
+
]),
|
|
350
|
+
_: 2
|
|
351
|
+
}, 1040)
|
|
352
|
+
]),
|
|
353
|
+
_: 1
|
|
354
|
+
})
|
|
355
|
+
], !0)
|
|
147
356
|
], 512), [
|
|
148
|
-
[
|
|
357
|
+
[Q, i.value]
|
|
149
358
|
]),
|
|
150
|
-
|
|
151
|
-
|
|
359
|
+
z(j("div", Qe, [
|
|
360
|
+
T(M.$slots, "default", {}, void 0, !0)
|
|
152
361
|
], 512), [
|
|
153
|
-
[
|
|
362
|
+
[Q, !i.value]
|
|
154
363
|
])
|
|
155
364
|
])
|
|
156
365
|
])
|
|
@@ -158,250 +367,409 @@ const j = (e, t) => {
|
|
|
158
367
|
]);
|
|
159
368
|
};
|
|
160
369
|
}
|
|
161
|
-
}),
|
|
162
|
-
const
|
|
163
|
-
for (const [s,
|
|
164
|
-
|
|
165
|
-
return
|
|
166
|
-
},
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
370
|
+
}), J = (e, t) => {
|
|
371
|
+
const n = e.__vccOpts || e;
|
|
372
|
+
for (const [s, a] of t)
|
|
373
|
+
n[s] = a;
|
|
374
|
+
return n;
|
|
375
|
+
}, ue = /* @__PURE__ */ J(Je, [["__scopeId", "data-v-38d43295"]]), Xe = ["modelValue", "logoUrl", "config", "innerPagesConfig", "projectTreeConfig", "userInfoConfig"], Ye = /* @__PURE__ */ P({
|
|
376
|
+
__name: "das-web-nav",
|
|
377
|
+
setup(e) {
|
|
378
|
+
const { nav: t } = U;
|
|
379
|
+
Me("das-ce-nav");
|
|
380
|
+
const n = l(() => t.logo || ""), s = A();
|
|
381
|
+
R(
|
|
382
|
+
() => t.activeItem,
|
|
383
|
+
(d) => {
|
|
384
|
+
const c = t.items.find((v) => v.value === d);
|
|
385
|
+
if (!c) {
|
|
386
|
+
s.value = "";
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
s.value = c.value;
|
|
390
|
+
}
|
|
391
|
+
);
|
|
392
|
+
const a = l(() => (t.items || []).filter((c) => c.fixed)), o = l(() => (t.items || []).filter((c) => !c.fixed)), i = l(() => ({
|
|
393
|
+
showSearch: !0,
|
|
394
|
+
showProjectTree: !0,
|
|
395
|
+
subAppList: o.value.map((d) => ({ code: d.value, name: d.label, ...d }))
|
|
396
|
+
})), r = l(() => {
|
|
397
|
+
const d = a.value.find((c) => c.value === t.activeItem);
|
|
398
|
+
return {
|
|
399
|
+
activeInnerPagePath: (d == null ? void 0 : d.path) || "",
|
|
400
|
+
innerPages: a.value.map((c) => ({ title: c.label, ...c }))
|
|
401
|
+
};
|
|
402
|
+
}), u = l(() => ({
|
|
403
|
+
projectStore: {
|
|
404
|
+
projectTree: t.projects,
|
|
405
|
+
currentProject: t.activeProject
|
|
406
|
+
}
|
|
407
|
+
})), g = l(() => t.userInfo), N = (d) => {
|
|
408
|
+
const c = d.detail[0], v = a.value.find(($) => c.value === $.value);
|
|
409
|
+
f.nav.setActiveItem(v.value), f.nav.triggerEventListener("onItemClick", v);
|
|
410
|
+
}, X = (d) => {
|
|
411
|
+
const c = d.detail[0], v = o.value.find(($) => c === $.value);
|
|
412
|
+
f.nav.setActiveItem(v.value), f.nav.triggerEventListener("onItemClick", v);
|
|
413
|
+
}, Y = (d) => {
|
|
414
|
+
const c = d.detail[0], v = o.value.find(($) => c === $.value);
|
|
415
|
+
f.nav.removeItem(v.value), f.nav.triggerEventListener("onItemRemove", v);
|
|
416
|
+
}, M = (d) => {
|
|
417
|
+
const [c, v] = d.detail;
|
|
418
|
+
c && (f.nav.setActiveProject(v), f.nav.triggerEventListener("onProjectChange", v));
|
|
419
|
+
};
|
|
420
|
+
return he(() => {
|
|
421
|
+
f.nav.triggerEventListener("onBeforeMount", null, { autoRemove: !0 });
|
|
422
|
+
}), be(() => {
|
|
423
|
+
f.nav.triggerEventListener("onMounted", null, { autoRemove: !0 });
|
|
424
|
+
}), _e(() => {
|
|
425
|
+
f.nav.triggerEventListener("onUnmounted", null, { autoRemove: !0 });
|
|
426
|
+
}), (d, c) => (p(), w("das-ce-nav", {
|
|
427
|
+
modelValue: s.value,
|
|
428
|
+
logoUrl: n.value,
|
|
429
|
+
config: i.value,
|
|
430
|
+
innerPagesConfig: r.value,
|
|
431
|
+
projectTreeConfig: u.value,
|
|
432
|
+
userInfoConfig: g.value,
|
|
433
|
+
"on:changeInnerPage": N,
|
|
434
|
+
"on:handleTabClick": X,
|
|
435
|
+
"on:handleTabDelete": Y,
|
|
436
|
+
"on:changeTreeHandle": M
|
|
437
|
+
}, null, 40, Xe));
|
|
438
|
+
}
|
|
439
|
+
}), de = (e, t = "children", n = !0) => Array.isArray(e) && e.length ? e.reduce((s, a) => {
|
|
440
|
+
let o = a[t], i = { ...a };
|
|
441
|
+
return n && delete i[t], o && o.length ? s.concat(i, de(o, t, n)) : s.concat(i);
|
|
442
|
+
}, []) : [], Ze = ["modelValue", "data", "collapse", "fixedTopMenu"], et = /* @__PURE__ */ P({
|
|
443
|
+
__name: "das-web-menu",
|
|
444
|
+
setup(e) {
|
|
445
|
+
const { menu: t } = U;
|
|
446
|
+
Ce();
|
|
447
|
+
const n = l(() => t.items), s = l(() => t.items.find((r) => r.fixed)), a = l(() => t.activeItem), o = l(() => t.collapse ?? !1), i = (r) => {
|
|
448
|
+
const u = r.detail[0], g = de(n.value).find((N) => u === N.id);
|
|
449
|
+
f.menu.setActiveItem(g.id), f.menu.triggerEventListener("onItemClick", g);
|
|
450
|
+
};
|
|
451
|
+
return (r, u) => n.value.length > 0 ? (p(), w("das-ce-menu", {
|
|
452
|
+
key: 0,
|
|
453
|
+
modelValue: a.value,
|
|
454
|
+
data: n.value,
|
|
455
|
+
collapse: o.value,
|
|
456
|
+
fixedTopMenu: s.value,
|
|
457
|
+
onChange: i
|
|
458
|
+
}, null, 40, Ze)) : k("", !0);
|
|
459
|
+
}
|
|
460
|
+
}), tt = ["modelValue", "options"], nt = /* @__PURE__ */ P({
|
|
461
|
+
__name: "das-web-tabs",
|
|
462
|
+
setup(e) {
|
|
463
|
+
const { tab: t } = U;
|
|
464
|
+
Te();
|
|
465
|
+
const n = l(() => t.items.map((i) => ({
|
|
466
|
+
...i,
|
|
467
|
+
key: i.value,
|
|
468
|
+
tab: i.label
|
|
469
|
+
}))), s = A();
|
|
470
|
+
R(
|
|
471
|
+
() => t.activeItem,
|
|
472
|
+
(i) => {
|
|
473
|
+
const r = n.value.find((u) => u.value === i);
|
|
474
|
+
s.value = r == null ? void 0 : r.value;
|
|
475
|
+
}
|
|
476
|
+
);
|
|
477
|
+
const a = (i) => {
|
|
478
|
+
const r = i.detail[0], u = n.value.find((g) => r === g.value);
|
|
479
|
+
f.tab.setActiveItem(u.value), f.tab.triggerEventListener("onItemClick", u);
|
|
480
|
+
}, o = (i) => {
|
|
481
|
+
const r = i.detail[0], u = n.value.find((g) => r === g.value);
|
|
482
|
+
f.tab.removeItem(u.value), f.tab.triggerEventListener("onItemRemove", u);
|
|
483
|
+
};
|
|
484
|
+
return (i, r) => n.value.length > 0 ? (p(), w("das-ce-tabs", {
|
|
485
|
+
key: 0,
|
|
486
|
+
modelValue: s.value,
|
|
487
|
+
options: n.value,
|
|
488
|
+
"on:tabClick": a,
|
|
489
|
+
"on:tabDelete": o
|
|
490
|
+
}, null, 40, tt)) : k("", !0);
|
|
491
|
+
}
|
|
492
|
+
}), h = A([]), me = V({
|
|
493
|
+
location: {}
|
|
494
|
+
}), x = A(!1);
|
|
495
|
+
let _ = null, I = null;
|
|
496
|
+
const q = (e, t, n) => {
|
|
497
|
+
var a, o;
|
|
498
|
+
const s = h.value.find((i) => i.name === e);
|
|
499
|
+
s && ((o = (a = s.dom) == null ? void 0 : a.contentWindow) == null || o.postMessage({ type: t, data: n }, s.entry));
|
|
500
|
+
}, re = (e, t) => {
|
|
501
|
+
var n;
|
|
502
|
+
(n = window.top) == null || n.postMessage({ type: e, data: t }, me.location.origin);
|
|
503
|
+
}, at = () => {
|
|
504
|
+
I || (I || (I = {}), window.addEventListener(
|
|
178
505
|
"message",
|
|
179
506
|
(e) => {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
u[t][a](e.data);
|
|
507
|
+
const { type: t, source: n } = e.data || {};
|
|
508
|
+
if (n !== "react-devtools-content-script" && I[t])
|
|
509
|
+
for (const s in I[t])
|
|
510
|
+
I[t][s](e.data);
|
|
185
511
|
},
|
|
186
512
|
!1
|
|
187
|
-
);
|
|
188
|
-
},
|
|
189
|
-
window.addEventListener(
|
|
513
|
+
));
|
|
514
|
+
}, st = () => {
|
|
515
|
+
_ || (_ || (_ = {}), window.addEventListener(
|
|
190
516
|
"message",
|
|
191
517
|
(e) => {
|
|
192
518
|
const { type: t } = e.data || {};
|
|
193
|
-
if (
|
|
194
|
-
for (const
|
|
195
|
-
|
|
519
|
+
if (_[t])
|
|
520
|
+
for (const n in _[t])
|
|
521
|
+
_[t][n](e.data);
|
|
196
522
|
},
|
|
197
523
|
!1
|
|
198
|
-
);
|
|
199
|
-
},
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
524
|
+
));
|
|
525
|
+
}, ot = (e, t) => {
|
|
526
|
+
st();
|
|
527
|
+
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
|
|
528
|
+
return _[e] || (_[e] = {}), _[e][n] = t, {
|
|
529
|
+
remove: () => {
|
|
530
|
+
_[e] && _[e][n] && delete _[e][n];
|
|
204
531
|
}
|
|
205
532
|
};
|
|
206
|
-
},
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
533
|
+
}, it = (e, t) => {
|
|
534
|
+
at();
|
|
535
|
+
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
|
|
536
|
+
return I[e] || (I[e] = {}), I[e][n] = t, {
|
|
537
|
+
remove: () => {
|
|
538
|
+
I[e] && I[e][n] && delete I[e][n];
|
|
211
539
|
}
|
|
212
540
|
};
|
|
213
|
-
},
|
|
541
|
+
}, D = {
|
|
542
|
+
loadMicroApp: (e) => {
|
|
543
|
+
x.value = !0;
|
|
544
|
+
const t = h.value.find((i) => i.name === e), n = h.value.find((i) => i.actived), s = !!t, a = !(t != null && t.loaded), o = t == null ? void 0 : t.actived;
|
|
545
|
+
if (!s) {
|
|
546
|
+
n && (n.actived = !1);
|
|
547
|
+
return;
|
|
548
|
+
}
|
|
549
|
+
if (a) {
|
|
550
|
+
t.src = t.entry;
|
|
551
|
+
const i = h.value.find((r) => r.actived);
|
|
552
|
+
i && (i.actived = !1), t.loaded = !0, t.actived = !0;
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
if (!o) {
|
|
556
|
+
n && (n.actived = !1), t.actived = !0;
|
|
557
|
+
return;
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
hideMicroApp: async (e) => {
|
|
561
|
+
x.value = !1;
|
|
562
|
+
const t = h.value.find((n) => n.name === e);
|
|
563
|
+
t && t.loaded && (t.dom || await new Promise((n) => R(() => t.dom, n)), q(e, "router", { cmd: "push", route: { name: "das-micro-app-ghost" } }));
|
|
564
|
+
},
|
|
565
|
+
hideAllMicroApp: () => {
|
|
566
|
+
x.value = !1, h.value.map((e) => {
|
|
567
|
+
e.actived = !1;
|
|
568
|
+
});
|
|
569
|
+
},
|
|
570
|
+
unloadMicroApp: (e) => {
|
|
571
|
+
x.value = !1;
|
|
572
|
+
const t = h.value.find((n) => n.name === e);
|
|
573
|
+
t && (t.loaded = !1, t.actived = !1);
|
|
574
|
+
},
|
|
575
|
+
unloadAllMicroApp: () => {
|
|
576
|
+
x.value = !1, h.value.map((e) => {
|
|
577
|
+
e.loaded = !1, e.actived = !1;
|
|
578
|
+
});
|
|
579
|
+
},
|
|
580
|
+
setMicroAppRoute: async (e, t) => {
|
|
581
|
+
const n = h.value.find((s) => s.name === e);
|
|
582
|
+
n && (!n.loaded || !n.actived || (n.dom || await new Promise((s) => R(() => n.dom, s)), q(e, "router", { cmd: "push", route: t })));
|
|
583
|
+
},
|
|
584
|
+
sendMessageToMicroApp: q,
|
|
585
|
+
sendMessageToMainApp: re,
|
|
586
|
+
addEventListenerFromMainApp: ot,
|
|
587
|
+
addEventListenerFromMicroApp: it,
|
|
588
|
+
setMainAppOverlay: (e, t) => {
|
|
589
|
+
re("bodyOverlay", { visible: e, style: t });
|
|
590
|
+
},
|
|
591
|
+
setMicroAppSessionStorage: async (e, t) => {
|
|
592
|
+
const n = h.value.find((s) => s.name === e);
|
|
593
|
+
n && (!n.loaded || !n.actived || (n.dom || await new Promise((s) => R(() => n.dom, s)), q(e, "sessionStorage", t)));
|
|
594
|
+
}
|
|
595
|
+
}, rt = ["src", "name"], ct = /* @__PURE__ */ P({
|
|
214
596
|
__name: "das-micro-app",
|
|
215
597
|
props: {
|
|
216
598
|
src: {},
|
|
217
599
|
name: {},
|
|
218
|
-
actived: { type: Boolean }
|
|
219
|
-
fullPath: {}
|
|
600
|
+
actived: { type: Boolean }
|
|
220
601
|
},
|
|
221
602
|
emits: ["loaded"],
|
|
222
603
|
setup(e, { emit: t }) {
|
|
223
|
-
const
|
|
224
|
-
s("loaded",
|
|
225
|
-
},
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}
|
|
229
|
-
return N(() => c.value, o), N(() => r.value, i), (l, w) => (f(), S("iframe", {
|
|
604
|
+
const n = e, s = t, a = (r) => {
|
|
605
|
+
s("loaded", r);
|
|
606
|
+
}, o = l(() => n.actived);
|
|
607
|
+
return R(() => o.value, (r) => {
|
|
608
|
+
D.sendMessageToMicroApp(n.name, r ? "onActivated" : "onDeactivated");
|
|
609
|
+
}), (r, u) => (p(), w("iframe", {
|
|
230
610
|
class: "das-micro-app",
|
|
231
|
-
src:
|
|
232
|
-
name:
|
|
611
|
+
src: n.src,
|
|
612
|
+
name: n.name,
|
|
233
613
|
frameborder: "0",
|
|
234
|
-
onLoad:
|
|
235
|
-
}, null, 40,
|
|
614
|
+
onLoad: a
|
|
615
|
+
}, null, 40, rt));
|
|
236
616
|
}
|
|
237
|
-
}),
|
|
617
|
+
}), lt = /* @__PURE__ */ J(ct, [["__scopeId", "data-v-76498068"]]), ut = /* @__PURE__ */ P({
|
|
618
|
+
__name: "das-micro-apps",
|
|
619
|
+
setup(e) {
|
|
620
|
+
const t = (n, s) => {
|
|
621
|
+
const a = h.value.find((o) => o.name === s);
|
|
622
|
+
a && (a.dom = n.target, D.sendMessageToMicroApp(s, "mainAppInfo", { location: { origin: window.location.origin } }));
|
|
623
|
+
};
|
|
624
|
+
return (n, s) => (p(!0), w(se, null, Ie(E(h), (a) => (p(), w(se, null, [
|
|
625
|
+
a.loaded ? z((p(), G(lt, {
|
|
626
|
+
key: 0,
|
|
627
|
+
src: a.src || "",
|
|
628
|
+
name: a.name,
|
|
629
|
+
actived: a.actived,
|
|
630
|
+
onLoaded: (o) => t(o, a.name)
|
|
631
|
+
}, null, 8, ["src", "name", "actived", "onLoaded"])), [
|
|
632
|
+
[Q, a.actived]
|
|
633
|
+
]) : k("", !0)
|
|
634
|
+
], 64))), 256));
|
|
635
|
+
}
|
|
636
|
+
}), dt = /* @__PURE__ */ J(ut, [["__scopeId", "data-v-17151868"]]), kt = /* @__PURE__ */ P({
|
|
238
637
|
__name: "das-main-app-layout",
|
|
239
638
|
props: {
|
|
240
639
|
transitionConfig: {}
|
|
241
640
|
},
|
|
242
641
|
setup(e) {
|
|
243
|
-
const t =
|
|
642
|
+
const t = l(() => !x.value), n = e, s = l(() => ({
|
|
244
643
|
"enter-active-class": "animate__animated animate__fadeInLeft",
|
|
245
|
-
...
|
|
246
|
-
}))
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
o.src = y;
|
|
256
|
-
const V = m.value.find((Z) => Z.actived);
|
|
257
|
-
V && (V.actived = !1), o.loaded = !0, o.actived = !0;
|
|
258
|
-
return;
|
|
259
|
-
}
|
|
260
|
-
if (!Y) {
|
|
261
|
-
i && (i.actived = !1), o.actived = !0;
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
264
|
-
}, r = (c, o) => {
|
|
265
|
-
const i = m.value.find((l) => l.name === o);
|
|
266
|
-
i && (i.dom = c.target, X(o, "mainAppInfo", "location", { origin: window.location.origin }));
|
|
267
|
-
};
|
|
268
|
-
return N(
|
|
269
|
-
() => a.fullPath,
|
|
270
|
-
() => {
|
|
271
|
-
var c;
|
|
272
|
-
n(String(((c = a.meta) == null ? void 0 : c.microAppName) || ""));
|
|
273
|
-
}
|
|
274
|
-
), (c, o) => (f(), g(U, { "transition-config": s.value }, {
|
|
275
|
-
header: p(() => [
|
|
276
|
-
v(c.$slots, "header")
|
|
644
|
+
...n.transitionConfig || {}
|
|
645
|
+
}));
|
|
646
|
+
return (a, o) => (p(), G(E(ue), {
|
|
647
|
+
"transition-config": s.value,
|
|
648
|
+
"router-view-visible": t.value
|
|
649
|
+
}, {
|
|
650
|
+
header: L(() => [
|
|
651
|
+
T(a.$slots, "header", {}, () => [
|
|
652
|
+
y(E(Ye))
|
|
653
|
+
])
|
|
277
654
|
]),
|
|
278
|
-
aside:
|
|
279
|
-
|
|
655
|
+
aside: L(() => [
|
|
656
|
+
T(a.$slots, "aside", {}, () => [
|
|
657
|
+
y(E(et))
|
|
658
|
+
])
|
|
280
659
|
]),
|
|
281
|
-
tab:
|
|
282
|
-
|
|
660
|
+
tab: L(() => [
|
|
661
|
+
T(a.$slots, "tab", {}, () => [
|
|
662
|
+
y(E(nt))
|
|
663
|
+
])
|
|
283
664
|
]),
|
|
284
|
-
|
|
285
|
-
(
|
|
286
|
-
default: p(() => [
|
|
287
|
-
i.loaded ? P((f(), g(Ee, {
|
|
288
|
-
key: 0,
|
|
289
|
-
src: i.src || i.entry,
|
|
290
|
-
name: i.name,
|
|
291
|
-
"full-path": i.currentFullPath,
|
|
292
|
-
onLoaded: (l) => r(l, i.name)
|
|
293
|
-
}, null, 8, ["src", "name", "full-path", "onLoaded"])), [
|
|
294
|
-
[E, i.actived]
|
|
295
|
-
]) : R("", !0)
|
|
296
|
-
]),
|
|
297
|
-
_: 2
|
|
298
|
-
}, 1040))), 256))
|
|
665
|
+
default: L(() => [
|
|
666
|
+
y(dt)
|
|
299
667
|
]),
|
|
300
668
|
_: 3
|
|
301
|
-
}, 8, ["transition-config"]));
|
|
669
|
+
}, 8, ["transition-config", "router-view-visible"]));
|
|
302
670
|
}
|
|
303
|
-
}),
|
|
304
|
-
function
|
|
671
|
+
}), mt = {};
|
|
672
|
+
function vt(e, t) {
|
|
305
673
|
return null;
|
|
306
674
|
}
|
|
307
|
-
const
|
|
308
|
-
e != null && e.microApps
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
const {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}
|
|
675
|
+
const ve = /* @__PURE__ */ J(mt, [["render", vt]]), ft = (e, t) => {
|
|
676
|
+
if (!(e != null && e.microApps))
|
|
677
|
+
return;
|
|
678
|
+
const { microAppRouterPrefix: n = "/das-micro-app" } = e || {};
|
|
679
|
+
h.value = e.microApps || [], t == null || t.addRoute({
|
|
680
|
+
name: "das-micro-app",
|
|
681
|
+
path: `${n}/:pathMatch(.*)*`,
|
|
682
|
+
component: ve,
|
|
683
|
+
meta: { isMicroApp: !0, keepAlive: !0 }
|
|
684
|
+
}), D.addEventListenerFromMicroApp("bodyOverlay", (s) => {
|
|
685
|
+
const { visible: a, style: o } = s.data;
|
|
686
|
+
f.overlay.set(a, o);
|
|
687
|
+
});
|
|
688
|
+
}, pt = (e, t) => {
|
|
689
|
+
if (!(e != null && e.microAppName))
|
|
690
|
+
return;
|
|
691
|
+
const n = "das-micro-app-ghost";
|
|
692
|
+
t == null || t.addRoute({
|
|
693
|
+
name: n,
|
|
694
|
+
path: `/${n}/:pathMatch(.*)*`,
|
|
695
|
+
component: ve,
|
|
696
|
+
meta: { isMicroApp: !0, keepAlive: !0 }
|
|
697
|
+
}), D.addEventListenerFromMainApp("router", (s) => {
|
|
698
|
+
var i;
|
|
699
|
+
const { cmd: a, route: o } = s.data;
|
|
700
|
+
(i = t == null ? void 0 : t[a]) == null || i.call(t, o);
|
|
701
|
+
}), D.addEventListenerFromMainApp("onDeactivated", (s) => {
|
|
702
|
+
const { path: a, params: o = {}, query: i = {} } = t.currentRoute.value;
|
|
703
|
+
t == null || t.push({ name: n, query: { fromQuery: { ...i }, fromPath: a }, params: o });
|
|
704
|
+
}), D.addEventListenerFromMainApp("onActivated", (s) => {
|
|
705
|
+
const { params: a = {}, query: o = {} } = t.currentRoute.value, { fromPath: i = "", fromQuery: r = {} } = o || {};
|
|
706
|
+
t == null || t.push({ path: i, query: r, params: a });
|
|
707
|
+
}), D.addEventListenerFromMainApp("mainAppInfo", (s) => {
|
|
708
|
+
const { data: a } = s;
|
|
709
|
+
for (const o in a)
|
|
710
|
+
me[o] = a[o];
|
|
711
|
+
}), D.addEventListenerFromMainApp("sessionStorage", (s) => {
|
|
712
|
+
const { cmd: a, data: o = [] } = s.data;
|
|
713
|
+
if (a === "setItem")
|
|
714
|
+
for (const i of o)
|
|
715
|
+
sessionStorage.setItem(i.key, i.value);
|
|
716
|
+
if (a === "getItem")
|
|
717
|
+
for (const i of o)
|
|
718
|
+
sessionStorage.getItem(i.key || i);
|
|
719
|
+
if (a === "clear" && sessionStorage.clear(), a === "clear")
|
|
720
|
+
for (const i of o)
|
|
721
|
+
sessionStorage.removeItem(i.key || i);
|
|
722
|
+
});
|
|
723
|
+
}, gt = (e) => {
|
|
724
|
+
var o, i;
|
|
725
|
+
const t = ((o = e == null ? void 0 : e.router) == null ? void 0 : o.options) || {}, s = Object.values(((i = e == null ? void 0 : e.router) == null ? void 0 : i.glob) || []).map((r) => r.default).filter((r) => !!r).flat().sort((r, u) => (r.index ?? 0) - (u.index ?? 0)).map((r) => {
|
|
726
|
+
const u = r.meta || {};
|
|
727
|
+
return u.keepAlive = u.keepAlive ?? e.keepAlive ?? !0, { ...r, meta: u };
|
|
728
|
+
});
|
|
729
|
+
return { router: Le({ history: we(), routes: s, ...t }) };
|
|
730
|
+
}, ht = {
|
|
361
731
|
install: (e, t) => {
|
|
362
732
|
var s;
|
|
363
|
-
const
|
|
364
|
-
|
|
365
|
-
|
|
733
|
+
const n = (s = t == null ? void 0 : t.plugins) == null ? void 0 : s.glob;
|
|
734
|
+
n && Object.values(n).sort((a, o) => (a.index ?? 0) - (o.index ?? 0)).forEach((a) => {
|
|
735
|
+
a.default && a.default.install && e.use(a.default, t);
|
|
366
736
|
});
|
|
367
737
|
}
|
|
368
|
-
},
|
|
369
|
-
e || (e = {});
|
|
370
|
-
const t =
|
|
371
|
-
Promise.all([
|
|
738
|
+
}, bt = () => window.config || {}, Dt = (e) => {
|
|
739
|
+
e || (e = {}), e = { ...e, ...bt() };
|
|
740
|
+
const t = A(!0);
|
|
741
|
+
Promise.all([$e(e), Pe(e)]).then(() => {
|
|
372
742
|
t.value = !1;
|
|
373
743
|
});
|
|
374
|
-
const { container:
|
|
375
|
-
|
|
376
|
-
const { router:
|
|
377
|
-
return e.microApps && e.microApps.length > 0 &&
|
|
744
|
+
const { container: n, component: s, props: a } = (e == null ? void 0 : e.root) || {}, o = Ae(s || ue, a);
|
|
745
|
+
o.use(ht, e);
|
|
746
|
+
const { router: i } = gt(e);
|
|
747
|
+
return e.microApps && e.microApps.length > 0 && ft(e, i), e.microAppName && pt(e, i), o.use(i), o.mount(n || "#app"), { app: o, router: i, loading: t };
|
|
378
748
|
};
|
|
379
749
|
export {
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
j as setThemeRule,
|
|
406
|
-
Ge as t
|
|
750
|
+
kt as DasMainAppLayout,
|
|
751
|
+
ue as DasWebLayout,
|
|
752
|
+
et as DasWebMenu,
|
|
753
|
+
Ye as DasWebNav,
|
|
754
|
+
nt as DasWebTabs,
|
|
755
|
+
Dt as createDasWebApp,
|
|
756
|
+
ee as currentLang,
|
|
757
|
+
F as currentTheme,
|
|
758
|
+
Se as getI18nRule,
|
|
759
|
+
Tt as getLang,
|
|
760
|
+
Re as getThemeRule,
|
|
761
|
+
Lt as getVar,
|
|
762
|
+
wt as getVarValue,
|
|
763
|
+
je as i18n,
|
|
764
|
+
Pe as initI18n,
|
|
765
|
+
ft as initMainApp,
|
|
766
|
+
pt as initMicroApp,
|
|
767
|
+
$e as initTheme,
|
|
768
|
+
f as layout,
|
|
769
|
+
D as microFrontend,
|
|
770
|
+
ie as setI18nRule,
|
|
771
|
+
Ct as setLang,
|
|
772
|
+
yt as setTheme,
|
|
773
|
+
oe as setThemeRule,
|
|
774
|
+
Mt as t
|
|
407
775
|
};
|