@morningfast/platform 0.0.6
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/dist/assets/main/style.css +13 -0
- package/dist/assets/main.css +1 -0
- package/dist/assets/sub/style.css +1 -0
- package/dist/auth/index.d.ts +32 -0
- package/dist/auth.js +49 -0
- package/dist/chunks/Forbidden-gf6y5Zsh.js +30 -0
- package/dist/chunks/Login-rBkUOl6l.js +209 -0
- package/dist/chunks/MicroAppView-DqTrIZZa.js +249 -0
- package/dist/chunks/NotFound-D0ybyfbK.js +30 -0
- package/dist/chunks/SystemConfig-DxkDxCnC.js +194 -0
- package/dist/chunks/_plugin-vue_export-helper-DvRHjpsZ.js +8 -0
- package/dist/chunks/app-Cn5iHmfI.js +221 -0
- package/dist/chunks/application-config-0d6f-odq.js +287 -0
- package/dist/chunks/auth-C3RvRgcW.js +248 -0
- package/dist/chunks/config-DkMAgPn_.js +44 -0
- package/dist/chunks/main-CfTD1njJ.js +1798 -0
- package/dist/chunks/storage-DNllLr_D.js +18 -0
- package/dist/chunks/sub-DlD5e1ys.js +140 -0
- package/dist/chunks/system-BbMsTIBR.js +160 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8 -0
- package/dist/main/api/adapter.d.ts +25 -0
- package/dist/main/api/auth.d.ts +12 -0
- package/dist/main/api/client.d.ts +3 -0
- package/dist/main/api/types.d.ts +1 -0
- package/dist/main/app/create-app.d.ts +29 -0
- package/dist/main/app/runtime-config.d.ts +5 -0
- package/dist/main/auth/expired.d.ts +2 -0
- package/dist/main/composables/useSortable.d.ts +197 -0
- package/dist/main/directives/index.d.ts +2 -0
- package/dist/main/index.d.ts +11 -0
- package/dist/main/layouts/AppLayout.vue.d.ts +3 -0
- package/dist/main/layouts/components/AppContentView.vue.d.ts +6 -0
- package/dist/main/layouts/components/AppHeader.vue.d.ts +7 -0
- package/dist/main/layouts/components/AppHeaderMenuNode.vue.d.ts +7 -0
- package/dist/main/layouts/components/AppMenuSearch.vue.d.ts +10 -0
- package/dist/main/layouts/components/AppMenuSearchItem.vue.d.ts +17 -0
- package/dist/main/layouts/components/AppMenuSearchTrigger.vue.d.ts +11 -0
- package/dist/main/layouts/components/AppSidebar.vue.d.ts +3 -0
- package/dist/main/layouts/components/AppSidebarNode.vue.d.ts +8 -0
- package/dist/main/layouts/components/AppSidebarSearch.vue.d.ts +11 -0
- package/dist/main/layouts/components/AppTabs.vue.d.ts +7 -0
- package/dist/main/layouts/components/AppTabsContextMenu.vue.d.ts +38 -0
- package/dist/main/layouts/composables/useAppMenus.d.ts +23 -0
- package/dist/main/layouts/composables/useShortcutLabel.d.ts +4 -0
- package/dist/main/layouts/utils/menuIcons.d.ts +1 -0
- package/dist/main/layouts/utils/menuSearch.d.ts +3 -0
- package/dist/main/micro-apps/config.d.ts +25 -0
- package/dist/main/micro-apps/register.d.ts +1 -0
- package/dist/main/micro-apps/status.d.ts +39 -0
- package/dist/main/micro-apps/types.d.ts +39 -0
- package/dist/main/pages/auth/Login.vue.d.ts +3 -0
- package/dist/main/pages/error/Forbidden.vue.d.ts +3 -0
- package/dist/main/pages/error/NotFound.vue.d.ts +3 -0
- package/dist/main/pages/micro/MicroAppView.vue.d.ts +3 -0
- package/dist/main/pages/system/SystemConfig.vue.d.ts +3 -0
- package/dist/main/pages/system/application-config/index.vue.d.ts +3 -0
- package/dist/main/router/base-routes.d.ts +2 -0
- package/dist/main/router/guard.d.ts +2 -0
- package/dist/main/router/index.d.ts +8 -0
- package/dist/main/settings/components/SystemSettingsDrawer.vue.d.ts +3 -0
- package/dist/main/settings/components/ThemeToggleButton.vue.d.ts +3 -0
- package/dist/main/settings/components/ThemedSvgImage.vue.d.ts +10 -0
- package/dist/main/stores/app.d.ts +85 -0
- package/dist/main/stores/auth.d.ts +110 -0
- package/dist/main/stores/index.d.ts +4 -0
- package/dist/main/stores/system.d.ts +111 -0
- package/dist/main/stores/tabs.d.ts +83 -0
- package/dist/main/utils/auth.d.ts +1 -0
- package/dist/main/utils/persistence.d.ts +3 -0
- package/dist/main/utils/storage.d.ts +3 -0
- package/dist/main/utils/theme.d.ts +20 -0
- package/dist/main.js +5 -0
- package/dist/micro-contract/index.d.ts +13 -0
- package/dist/micro-contract.js +4 -0
- package/dist/request/index.d.ts +72 -0
- package/dist/request.js +153 -0
- package/dist/sub/app/mount.d.ts +7 -0
- package/dist/sub/composables/useRequestClient.d.ts +5 -0
- package/dist/sub/composables/useSubAppContext.d.ts +1 -0
- package/dist/sub/context/sub-app-context.d.ts +10 -0
- package/dist/sub/index.d.ts +8 -0
- package/dist/sub/qiankun/index.d.ts +38 -0
- package/dist/sub/router/index.d.ts +2 -0
- package/dist/sub/theme/index.d.ts +2 -0
- package/dist/sub.js +2 -0
- package/package.json +86 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { computed as e, ref as t } from "vue";
|
|
2
|
+
import { defineStore as n } from "pinia";
|
|
3
|
+
//#region src/main/utils/theme.ts
|
|
4
|
+
var r = "theme-color", i = "theme-mode", a = "theme-position", o = [
|
|
5
|
+
{
|
|
6
|
+
label: "默认蓝",
|
|
7
|
+
value: "#409EFF"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
label: "深蓝色",
|
|
11
|
+
value: "#0960BE"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
label: "靛蓝色",
|
|
15
|
+
value: "#045277"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: "天空蓝",
|
|
19
|
+
value: "#78B5FE"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
label: "深绿色",
|
|
23
|
+
value: "#0C522B"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
label: "翡翠绿",
|
|
27
|
+
value: "#009773"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: "浅绿色",
|
|
31
|
+
value: "#0BD092"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
label: "紫罗兰",
|
|
35
|
+
value: "#7166F0"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
label: "樱花粉",
|
|
39
|
+
value: "#FFB7C5"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: "柠檬黄",
|
|
43
|
+
value: "#EFBD48"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
label: "橙黄色",
|
|
47
|
+
value: "#C1420B"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
label: "玫瑰红",
|
|
51
|
+
value: "#BB1B1B"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: "锌色灰",
|
|
55
|
+
value: "#3F3F46"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: "中性灰",
|
|
59
|
+
value: "#404040"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: "石板灰",
|
|
63
|
+
value: "#344256"
|
|
64
|
+
}
|
|
65
|
+
];
|
|
66
|
+
function s() {
|
|
67
|
+
return localStorage.getItem(r) || "#409EFF";
|
|
68
|
+
}
|
|
69
|
+
function c() {
|
|
70
|
+
let e = localStorage.getItem(i);
|
|
71
|
+
return e === "light" || e === "dark" || e === "system" ? e : "light";
|
|
72
|
+
}
|
|
73
|
+
function l(e) {
|
|
74
|
+
localStorage.setItem(r, e);
|
|
75
|
+
}
|
|
76
|
+
function u(e) {
|
|
77
|
+
localStorage.setItem(i, e);
|
|
78
|
+
}
|
|
79
|
+
function d() {
|
|
80
|
+
let e = localStorage.getItem(a);
|
|
81
|
+
return e === "none" || e === "header" || e === "sidebar" ? e : "none";
|
|
82
|
+
}
|
|
83
|
+
function f(e) {
|
|
84
|
+
localStorage.setItem(a, e);
|
|
85
|
+
}
|
|
86
|
+
function p() {
|
|
87
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
88
|
+
}
|
|
89
|
+
function m(e) {
|
|
90
|
+
return e === "dark" || e === "system" && p();
|
|
91
|
+
}
|
|
92
|
+
function h(e) {
|
|
93
|
+
let t = m(e);
|
|
94
|
+
document.documentElement.classList.toggle("dark", t), document.documentElement.style.colorScheme = t ? "dark" : "light";
|
|
95
|
+
}
|
|
96
|
+
function g(e) {
|
|
97
|
+
let t = document.documentElement, n = t.classList.contains("dark");
|
|
98
|
+
t.style.setProperty("--el-color-primary", e), t.style.setProperty("--el-color-primary-light-3", x(e, n ? "#000000" : "#ffffff", .3)), t.style.setProperty("--el-color-primary-light-5", x(e, n ? "#000000" : "#ffffff", .5)), t.style.setProperty("--el-color-primary-light-7", x(e, n ? "#000000" : "#ffffff", .7)), t.style.setProperty("--el-color-primary-light-8", x(e, n ? "#000000" : "#ffffff", .8)), t.style.setProperty("--el-color-primary-light-9", x(e, n ? "#000000" : "#ffffff", .9)), t.style.setProperty("--el-color-primary-dark-2", x(e, n ? "#ffffff" : "#000000", .2));
|
|
99
|
+
}
|
|
100
|
+
function _() {
|
|
101
|
+
h(c()), g(s()), v(d());
|
|
102
|
+
}
|
|
103
|
+
function v(e) {
|
|
104
|
+
document.documentElement.setAttribute("data-theme-position", e);
|
|
105
|
+
}
|
|
106
|
+
function y(e = 50) {
|
|
107
|
+
return new Promise((t) => {
|
|
108
|
+
setTimeout(() => {
|
|
109
|
+
g(s()), t();
|
|
110
|
+
}, e);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
async function b(e, t) {
|
|
114
|
+
if (!document.startViewTransition) {
|
|
115
|
+
t(), await y();
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
let n = e.clientX, r = e.clientY, i = Math.hypot(Math.max(n, innerWidth - n), Math.max(r, innerHeight - r));
|
|
119
|
+
try {
|
|
120
|
+
document.startViewTransition(() => {
|
|
121
|
+
t();
|
|
122
|
+
}).ready.then(() => {
|
|
123
|
+
let e = 100 * n / innerWidth, t = 100 * r / innerHeight, a = Math.hypot(innerWidth, innerHeight) / Math.SQRT2, o = 100 * i / a, s = [`circle(0% at ${e}% ${t}%)`, `circle(${o}% at ${e}% ${t}%)`], c = document.documentElement.classList.contains("dark");
|
|
124
|
+
document.documentElement.animate({ clipPath: c ? s.reverse() : s }, {
|
|
125
|
+
duration: 400,
|
|
126
|
+
easing: "ease-in",
|
|
127
|
+
fill: "both",
|
|
128
|
+
pseudoElement: c ? "::view-transition-old(root)" : "::view-transition-new(root)"
|
|
129
|
+
});
|
|
130
|
+
}), await y();
|
|
131
|
+
} catch {
|
|
132
|
+
t(), await y();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function x(e, t, n) {
|
|
136
|
+
let [r, i, a] = S(e), [o, s, c] = S(t), l = (e, t) => Math.round(e * (1 - n) + t * n);
|
|
137
|
+
return `rgb(${l(r, o)}, ${l(i, s)}, ${l(a, c)})`;
|
|
138
|
+
}
|
|
139
|
+
function S(e) {
|
|
140
|
+
let t = e.replace("#", ""), n = t.length === 3 ? t.split("").map((e) => e + e).join("") : t, r = Number.parseInt(n, 16);
|
|
141
|
+
return [
|
|
142
|
+
r >> 16 & 255,
|
|
143
|
+
r >> 8 & 255,
|
|
144
|
+
r & 255
|
|
145
|
+
];
|
|
146
|
+
}
|
|
147
|
+
//#endregion
|
|
148
|
+
//#region src/main/stores/app.ts
|
|
149
|
+
var C = "sidebar-collapsed", w = "menu-search-placement", T = "layout-mode", E = "top-menu-path", D = n("app", () => {
|
|
150
|
+
let n = t(localStorage.getItem(C) === "true"), r = t(!1), i = t("theme"), a = t(c()), o = t(s()), y = t(d()), b = t(localStorage.getItem(T) || "side"), x = t(localStorage.getItem(w) || "header"), S = t(localStorage.getItem(E) || ""), D = t(!0), O = e(() => m(a.value)), k = e(() => b.value === "top" ? ["header"] : ["header", "sidebar"]), A = e(() => b.value !== "top" && x.value === "sidebar");
|
|
151
|
+
function j() {
|
|
152
|
+
n.value = !n.value;
|
|
153
|
+
}
|
|
154
|
+
function M(e) {
|
|
155
|
+
n.value = e, localStorage.setItem(C, String(n.value));
|
|
156
|
+
}
|
|
157
|
+
function N(e = "theme") {
|
|
158
|
+
i.value = e, r.value = !0;
|
|
159
|
+
}
|
|
160
|
+
function P() {
|
|
161
|
+
r.value = !1;
|
|
162
|
+
}
|
|
163
|
+
function F(e) {
|
|
164
|
+
r.value = e;
|
|
165
|
+
}
|
|
166
|
+
function I(e) {
|
|
167
|
+
a.value = e, u(e), h(e), g(o.value);
|
|
168
|
+
}
|
|
169
|
+
function L() {
|
|
170
|
+
I(p() && a.value === "system" || O.value ? "light" : "dark");
|
|
171
|
+
}
|
|
172
|
+
function R(e) {
|
|
173
|
+
o.value = e, l(e), g(e);
|
|
174
|
+
}
|
|
175
|
+
function z(e) {
|
|
176
|
+
y.value = e, f(e), v(e);
|
|
177
|
+
}
|
|
178
|
+
function B(e) {
|
|
179
|
+
b.value = e, localStorage.setItem(T, e), e === "top" && x.value === "sidebar" && V("header");
|
|
180
|
+
}
|
|
181
|
+
function V(e) {
|
|
182
|
+
let t = b.value === "top" ? "header" : e;
|
|
183
|
+
x.value = t, localStorage.setItem(w, t);
|
|
184
|
+
}
|
|
185
|
+
function H(e) {
|
|
186
|
+
S.value = e, localStorage.setItem(E, e);
|
|
187
|
+
}
|
|
188
|
+
function U() {
|
|
189
|
+
_();
|
|
190
|
+
}
|
|
191
|
+
return {
|
|
192
|
+
closeSettings: P,
|
|
193
|
+
initializePreferences: U,
|
|
194
|
+
isDark: O,
|
|
195
|
+
layoutMode: b,
|
|
196
|
+
menuSearchPlacement: x,
|
|
197
|
+
menuSearchPlacementOptions: k,
|
|
198
|
+
openSettings: N,
|
|
199
|
+
isSidebarMenuSearch: A,
|
|
200
|
+
settingsActiveTab: i,
|
|
201
|
+
selectedTopMenuPath: S,
|
|
202
|
+
setLayoutMode: B,
|
|
203
|
+
setMenuSearchPlacement: V,
|
|
204
|
+
setSelectedTopMenuPath: H,
|
|
205
|
+
setSettingsVisible: F,
|
|
206
|
+
setSidebarCollapsed: M,
|
|
207
|
+
setThemeColor: R,
|
|
208
|
+
setThemeColorPosition: z,
|
|
209
|
+
setThemeMode: I,
|
|
210
|
+
settingsVisible: r,
|
|
211
|
+
sidebarCollapsed: n,
|
|
212
|
+
shortcutTipVisible: D,
|
|
213
|
+
themeColor: o,
|
|
214
|
+
themeColorPosition: y,
|
|
215
|
+
themeMode: a,
|
|
216
|
+
toggleDarkMode: L,
|
|
217
|
+
toggleSidebar: j
|
|
218
|
+
};
|
|
219
|
+
});
|
|
220
|
+
//#endregion
|
|
221
|
+
export { b as n, o as r, D as t };
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-DvRHjpsZ.js";
|
|
2
|
+
import { a as t, i as n, n as r } from "./config-DkMAgPn_.js";
|
|
3
|
+
import { ElMessage as i } from "element-plus";
|
|
4
|
+
import { Fragment as a, computed as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, normalizeClass as p, openBlock as m, reactive as h, ref as g, renderList as _, resolveComponent as v, toDisplayString as y, withCtx as b, withModifiers as x } from "vue";
|
|
5
|
+
//#region src/main/pages/system/application-config/index.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var S = { class: "app-config-page" }, C = { class: "app-config-page__apps" }, w = { class: "app-config-section__header" }, T = { class: "app-config-section__title" }, E = { class: "app-config-page__grid" }, D = ["onClick"], ee = { class: "app-config-card__title-row" }, O = { class: "app-config-card__desc" }, k = { class: "app-config-card__path" }, A = { class: "app-config-card__entry" }, j = { class: "app-config-card__footer" }, M = { class: "app-config-card__footer-actions" }, N = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "app-config-page__empty"
|
|
9
|
+
}, P = { class: "app-config-empty__actions" }, F = { class: "app-config-dialog__footer" }, I = { class: "app-config-remove__text" }, L = { class: "app-config-dialog__footer" }, R = /* @__PURE__ */ e(/* @__PURE__ */ f({
|
|
10
|
+
__name: "index",
|
|
11
|
+
setup(e) {
|
|
12
|
+
let f = g(!1), R = g("create"), z = g(!1), B = g(!1), V = g(!1), H = g(null), U = g(J()), W = g(U.value[0]?.id || ""), G = g(""), K = h(Y()), q = o(() => R.value === "edit" ? "编辑子应用" : R.value === "copy" ? "复制子应用" : "新增子应用");
|
|
13
|
+
function J() {
|
|
14
|
+
return r();
|
|
15
|
+
}
|
|
16
|
+
function Y() {
|
|
17
|
+
return {
|
|
18
|
+
id: "",
|
|
19
|
+
name: "",
|
|
20
|
+
description: "",
|
|
21
|
+
basePath: "",
|
|
22
|
+
entry: ""
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function X() {
|
|
26
|
+
R.value = "create", G.value = "", Object.assign(K, Y()), f.value = !0;
|
|
27
|
+
}
|
|
28
|
+
function Z(e) {
|
|
29
|
+
R.value = "edit", G.value = e.id, Object.assign(K, {
|
|
30
|
+
id: e.id,
|
|
31
|
+
name: e.name,
|
|
32
|
+
description: e.description,
|
|
33
|
+
basePath: e.basePath,
|
|
34
|
+
entry: e.entry
|
|
35
|
+
}), f.value = !0;
|
|
36
|
+
}
|
|
37
|
+
function te(e) {
|
|
38
|
+
R.value = "copy", G.value = "", Object.assign(K, {
|
|
39
|
+
id: "",
|
|
40
|
+
name: e.name,
|
|
41
|
+
description: e.description,
|
|
42
|
+
basePath: e.basePath,
|
|
43
|
+
entry: e.entry
|
|
44
|
+
}), f.value = !0;
|
|
45
|
+
}
|
|
46
|
+
function ne(e) {
|
|
47
|
+
H.value = e, B.value = !0;
|
|
48
|
+
}
|
|
49
|
+
async function re() {
|
|
50
|
+
if (!K.name.trim() || !K.basePath.trim()) {
|
|
51
|
+
i.warning("请先填写子应用名称和路由前缀");
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (!K.entry.trim()) {
|
|
55
|
+
i.warning("请先填写子应用入口地址");
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
z.value = !0;
|
|
59
|
+
try {
|
|
60
|
+
let e = {
|
|
61
|
+
id: G.value || `app-${Date.now()}`,
|
|
62
|
+
name: K.name.trim(),
|
|
63
|
+
type: "sub",
|
|
64
|
+
description: K.description.trim(),
|
|
65
|
+
basePath: n(K.basePath),
|
|
66
|
+
entry: K.entry.trim()
|
|
67
|
+
};
|
|
68
|
+
R.value === "edit" ? U.value = U.value.map((t) => t.id === G.value ? e : t) : U.value = [e, ...U.value], await $(), W.value = e.id, f.value = !1, i.success(Q());
|
|
69
|
+
} finally {
|
|
70
|
+
z.value = !1;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function Q() {
|
|
74
|
+
return R.value === "edit" ? "子应用已更新" : R.value === "copy" ? "子应用已复制" : "子应用已新增";
|
|
75
|
+
}
|
|
76
|
+
async function ie() {
|
|
77
|
+
if (!H.value) {
|
|
78
|
+
B.value = !1;
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
V.value = !0;
|
|
82
|
+
try {
|
|
83
|
+
U.value = U.value.filter((e) => e.id !== H.value?.id), await $(), W.value = U.value[0]?.id || "", B.value = !1, i.success("子应用已删除");
|
|
84
|
+
} finally {
|
|
85
|
+
V.value = !1, H.value = null;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
async function $() {
|
|
89
|
+
await t(U.value);
|
|
90
|
+
}
|
|
91
|
+
function ae() {
|
|
92
|
+
G.value = "", Object.assign(K, Y());
|
|
93
|
+
}
|
|
94
|
+
return (e, t) => {
|
|
95
|
+
let n = v("el-tag"), r = v("el-button"), i = v("el-scrollbar"), o = v("el-empty"), h = v("el-input"), g = v("el-form-item"), R = v("el-col"), G = v("el-row"), J = v("el-alert"), Y = v("el-form"), Q = v("el-dialog");
|
|
96
|
+
return m(), c("div", S, [
|
|
97
|
+
l("section", C, [l("div", w, [l("div", T, [t[9] ||= l("h2", null, "子应用", -1), d(n, {
|
|
98
|
+
size: "small",
|
|
99
|
+
effect: "plain"
|
|
100
|
+
}, {
|
|
101
|
+
default: b(() => [u(y(U.value.length), 1)]),
|
|
102
|
+
_: 1
|
|
103
|
+
})]), d(r, {
|
|
104
|
+
type: "primary",
|
|
105
|
+
onClick: X
|
|
106
|
+
}, {
|
|
107
|
+
default: b(() => [...t[10] ||= [u("新增子应用", -1)]]),
|
|
108
|
+
_: 1
|
|
109
|
+
})]), d(i, { class: "app-config-page__scroll" }, {
|
|
110
|
+
default: b(() => [l("div", E, [(m(!0), c(a, null, _(U.value, (e) => (m(), c("article", {
|
|
111
|
+
key: e.id,
|
|
112
|
+
class: p(["app-config-card", { "is-active": W.value === e.id }]),
|
|
113
|
+
onClick: (t) => W.value = e.id
|
|
114
|
+
}, [
|
|
115
|
+
l("div", ee, [l("h2", null, y(e.name), 1), d(n, {
|
|
116
|
+
type: "success",
|
|
117
|
+
effect: "plain",
|
|
118
|
+
size: "small"
|
|
119
|
+
}, {
|
|
120
|
+
default: b(() => [...t[11] ||= [u("子应用", -1)]]),
|
|
121
|
+
_: 1
|
|
122
|
+
})]),
|
|
123
|
+
l("p", O, y(e.description || "暂无子应用说明"), 1),
|
|
124
|
+
l("div", k, y(e.basePath), 1),
|
|
125
|
+
l("div", A, y(e.entry), 1),
|
|
126
|
+
l("div", j, [t[15] ||= l("span", { class: "app-config-card__mount" }, "qiankun", -1), l("div", M, [
|
|
127
|
+
d(r, {
|
|
128
|
+
type: "primary",
|
|
129
|
+
link: "",
|
|
130
|
+
onClick: x((t) => Z(e), ["stop"])
|
|
131
|
+
}, {
|
|
132
|
+
default: b(() => [...t[12] ||= [u("配置", -1)]]),
|
|
133
|
+
_: 1
|
|
134
|
+
}, 8, ["onClick"]),
|
|
135
|
+
d(r, {
|
|
136
|
+
type: "primary",
|
|
137
|
+
link: "",
|
|
138
|
+
onClick: x((t) => te(e), ["stop"])
|
|
139
|
+
}, {
|
|
140
|
+
default: b(() => [...t[13] ||= [u("复制", -1)]]),
|
|
141
|
+
_: 1
|
|
142
|
+
}, 8, ["onClick"]),
|
|
143
|
+
d(r, {
|
|
144
|
+
type: "danger",
|
|
145
|
+
link: "",
|
|
146
|
+
onClick: x((t) => ne(e), ["stop"])
|
|
147
|
+
}, {
|
|
148
|
+
default: b(() => [...t[14] ||= [u("删除", -1)]]),
|
|
149
|
+
_: 1
|
|
150
|
+
}, 8, ["onClick"])
|
|
151
|
+
])])
|
|
152
|
+
], 10, D))), 128))])]),
|
|
153
|
+
_: 1
|
|
154
|
+
})]),
|
|
155
|
+
U.value.length ? s("", !0) : (m(), c("section", N, [d(o, { description: "暂无子应用配置" }, {
|
|
156
|
+
default: b(() => [l("div", P, [d(r, {
|
|
157
|
+
type: "primary",
|
|
158
|
+
onClick: X
|
|
159
|
+
}, {
|
|
160
|
+
default: b(() => [...t[16] ||= [u("新增子应用", -1)]]),
|
|
161
|
+
_: 1
|
|
162
|
+
})])]),
|
|
163
|
+
_: 1
|
|
164
|
+
})])),
|
|
165
|
+
d(Q, {
|
|
166
|
+
modelValue: f.value,
|
|
167
|
+
"onUpdate:modelValue": t[6] ||= (e) => f.value = e,
|
|
168
|
+
title: q.value,
|
|
169
|
+
width: "720px",
|
|
170
|
+
"destroy-on-close": "",
|
|
171
|
+
onClosed: ae
|
|
172
|
+
}, {
|
|
173
|
+
footer: b(() => [l("div", F, [d(r, { onClick: t[5] ||= (e) => f.value = !1 }, {
|
|
174
|
+
default: b(() => [...t[17] ||= [u("取消", -1)]]),
|
|
175
|
+
_: 1
|
|
176
|
+
}), d(r, {
|
|
177
|
+
type: "primary",
|
|
178
|
+
loading: z.value,
|
|
179
|
+
onClick: re
|
|
180
|
+
}, {
|
|
181
|
+
default: b(() => [...t[18] ||= [u("保存", -1)]]),
|
|
182
|
+
_: 1
|
|
183
|
+
}, 8, ["loading"])])]),
|
|
184
|
+
default: b(() => [d(Y, {
|
|
185
|
+
"label-width": "92px",
|
|
186
|
+
onSubmit: t[4] ||= x(() => {}, ["prevent"])
|
|
187
|
+
}, {
|
|
188
|
+
default: b(() => [d(G, { gutter: 16 }, {
|
|
189
|
+
default: b(() => [
|
|
190
|
+
d(R, {
|
|
191
|
+
xs: 24,
|
|
192
|
+
sm: 12
|
|
193
|
+
}, {
|
|
194
|
+
default: b(() => [d(g, { label: "子应用名称" }, {
|
|
195
|
+
default: b(() => [d(h, {
|
|
196
|
+
modelValue: K.name,
|
|
197
|
+
"onUpdate:modelValue": t[0] ||= (e) => K.name = e,
|
|
198
|
+
placeholder: "请输入子应用名称"
|
|
199
|
+
}, null, 8, ["modelValue"])]),
|
|
200
|
+
_: 1
|
|
201
|
+
})]),
|
|
202
|
+
_: 1
|
|
203
|
+
}),
|
|
204
|
+
d(R, {
|
|
205
|
+
xs: 24,
|
|
206
|
+
sm: 12
|
|
207
|
+
}, {
|
|
208
|
+
default: b(() => [d(g, { label: "路由前缀" }, {
|
|
209
|
+
default: b(() => [d(h, {
|
|
210
|
+
modelValue: K.basePath,
|
|
211
|
+
"onUpdate:modelValue": t[1] ||= (e) => K.basePath = e,
|
|
212
|
+
placeholder: "例如 /micro/sub-app"
|
|
213
|
+
}, null, 8, ["modelValue"])]),
|
|
214
|
+
_: 1
|
|
215
|
+
})]),
|
|
216
|
+
_: 1
|
|
217
|
+
}),
|
|
218
|
+
d(R, {
|
|
219
|
+
xs: 24,
|
|
220
|
+
sm: 12
|
|
221
|
+
}, {
|
|
222
|
+
default: b(() => [d(g, { label: "入口地址" }, {
|
|
223
|
+
default: b(() => [d(h, {
|
|
224
|
+
modelValue: K.entry,
|
|
225
|
+
"onUpdate:modelValue": t[2] ||= (e) => K.entry = e,
|
|
226
|
+
placeholder: "例如 http://localhost:5174"
|
|
227
|
+
}, null, 8, ["modelValue"])]),
|
|
228
|
+
_: 1
|
|
229
|
+
})]),
|
|
230
|
+
_: 1
|
|
231
|
+
}),
|
|
232
|
+
d(R, { xs: 24 }, {
|
|
233
|
+
default: b(() => [d(g, { label: "子应用说明" }, {
|
|
234
|
+
default: b(() => [d(h, {
|
|
235
|
+
modelValue: K.description,
|
|
236
|
+
"onUpdate:modelValue": t[3] ||= (e) => K.description = e,
|
|
237
|
+
type: "textarea",
|
|
238
|
+
rows: 3,
|
|
239
|
+
placeholder: "请输入子应用说明"
|
|
240
|
+
}, null, 8, ["modelValue"])]),
|
|
241
|
+
_: 1
|
|
242
|
+
})]),
|
|
243
|
+
_: 1
|
|
244
|
+
})
|
|
245
|
+
]),
|
|
246
|
+
_: 1
|
|
247
|
+
}), d(J, {
|
|
248
|
+
type: "info",
|
|
249
|
+
closable: !1,
|
|
250
|
+
"show-icon": "",
|
|
251
|
+
title: "当前页面只维护子应用;系统壳本身不作为应用配置项维护。"
|
|
252
|
+
})]),
|
|
253
|
+
_: 1
|
|
254
|
+
})]),
|
|
255
|
+
_: 1
|
|
256
|
+
}, 8, ["modelValue", "title"]),
|
|
257
|
+
d(Q, {
|
|
258
|
+
modelValue: B.value,
|
|
259
|
+
"onUpdate:modelValue": t[8] ||= (e) => B.value = e,
|
|
260
|
+
title: "删除子应用",
|
|
261
|
+
width: "420px",
|
|
262
|
+
"destroy-on-close": ""
|
|
263
|
+
}, {
|
|
264
|
+
footer: b(() => [l("div", L, [d(r, { onClick: t[7] ||= (e) => B.value = !1 }, {
|
|
265
|
+
default: b(() => [...t[21] ||= [u("取消", -1)]]),
|
|
266
|
+
_: 1
|
|
267
|
+
}), d(r, {
|
|
268
|
+
type: "danger",
|
|
269
|
+
loading: V.value,
|
|
270
|
+
onClick: ie
|
|
271
|
+
}, {
|
|
272
|
+
default: b(() => [...t[22] ||= [u("确认删除", -1)]]),
|
|
273
|
+
_: 1
|
|
274
|
+
}, 8, ["loading"])])]),
|
|
275
|
+
default: b(() => [l("p", I, [
|
|
276
|
+
t[19] ||= u(" 确认删除 ", -1),
|
|
277
|
+
l("strong", null, y(H.value?.name), 1),
|
|
278
|
+
t[20] ||= u(" 吗?删除后本地子应用配置会立即移除。 ", -1)
|
|
279
|
+
])]),
|
|
280
|
+
_: 1
|
|
281
|
+
}, 8, ["modelValue"])
|
|
282
|
+
]);
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
}), [["__scopeId", "data-v-0066cec3"]]);
|
|
286
|
+
//#endregion
|
|
287
|
+
export { R as default };
|