@morningfast/platform 0.0.9 → 0.0.10
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.
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
.theme-icon-btn[data-v-73aaf569] .el-icon{justify-content:center;align-items:center;display:inline-flex}
|
|
5
5
|
|
|
6
6
|
/* route-items.css */
|
|
7
|
-
.micro-app-page[data-v-
|
|
7
|
+
.micro-app-page[data-v-eee80378]{background-color:var(--el-bg-color-page);min-height:100%;position:relative}.micro-app-page__container[data-v-eee80378]{min-height:100%}.micro-app-page__state[data-v-eee80378]{z-index:2;box-sizing:border-box;border:1px solid var(--el-border-color-lighter);background-color:var(--el-bg-color);width:min(560px,100% - 48px);box-shadow:var(--el-box-shadow-light);border-radius:8px;gap:16px;padding:22px 24px;display:flex;position:absolute;top:96px;left:50%;transform:translate(-50%)}.micro-app-page__state--error[data-v-eee80378]{align-items:flex-start}.micro-app-page__icon[data-v-eee80378]{color:var(--el-color-warning);margin-top:2px;font-size:24px}.micro-app-page__body[data-v-eee80378]{flex:1;min-width:0}.micro-app-page__title[data-v-eee80378]{color:var(--el-text-color-primary);margin:0;font-size:16px;font-weight:600;line-height:24px}.micro-app-page__desc[data-v-eee80378]{color:var(--el-text-color-secondary);margin:6px 0 0;font-size:14px;line-height:22px}.micro-app-page__meta[data-v-eee80378]{background-color:var(--el-fill-color-lighter);border-radius:6px;gap:8px;margin:16px 0 0;padding:12px 14px;display:grid}.micro-app-page__meta div[data-v-eee80378]{grid-template-columns:56px minmax(0,1fr);gap:8px;font-size:13px;line-height:20px;display:grid}.micro-app-page__meta dt[data-v-eee80378]{color:var(--el-text-color-secondary)}.micro-app-page__meta dd[data-v-eee80378]{overflow-wrap:anywhere;min-width:0;color:var(--el-text-color-primary);margin:0}.micro-app-page__actions[data-v-eee80378]{gap:10px;margin-top:18px;display:flex}
|
|
8
8
|
|
|
9
9
|
/* Login.css */
|
|
10
10
|
.login-page[data-v-8e99a976]{background:#eef6ff;justify-content:center;align-items:stretch;min-height:100vh;padding:0;display:flex}.login-page__panel[data-v-8e99a976]{grid-template-columns:minmax(0,1fr) 480px;width:min(1500px,100%);min-height:100vh;display:grid}.login-page__hero[data-v-8e99a976]{color:#123c66;min-height:100vh;position:relative;overflow:hidden}.login-page__brand[data-v-8e99a976]{z-index:1;align-items:center;gap:12px;margin-bottom:0;display:flex;position:relative;top:34px;left:clamp(28px,4vw,56px)}.login-page__brand-logo[data-v-8e99a976]{object-fit:contain;flex:none;width:36px;height:36px}.login-page__brand span[data-v-8e99a976]{color:#3d536b;font-size:20px;font-weight:700}.login-page__visual[data-v-8e99a976]{object-fit:cover;object-position:center;width:100%;height:100%;display:block;position:absolute;inset:0}.login-page__account[data-v-8e99a976]{background:#f7fbff;flex-direction:column;justify-content:center;align-items:center;min-height:100vh;padding:56px 54px;display:flex}.login-page__card[data-v-8e99a976]{border:none;border-radius:8px;width:min(440px,100%);position:relative;overflow:hidden;box-shadow:0 22px 52px #2e55821f}.login-page__card[data-v-8e99a976] .el-card__body{padding:28px 34px 34px}.login-page__card[data-v-8e99a976] .el-card__header{z-index:2;border-bottom:0;padding:30px 34px 8px;position:relative}.login-page__card-header[data-v-8e99a976]{flex-direction:column;gap:8px;display:flex}.login-page__card-header strong[data-v-8e99a976]{color:var(--el-text-color-primary);font-size:20px}.login-page__card-header span[data-v-8e99a976]{color:var(--el-text-color-secondary);font-size:13px}.login-page__qr-corner[data-v-8e99a976]{z-index:4;cursor:pointer;background:0 0;border:0;width:72px;height:72px;padding:0;position:absolute;top:0;right:0}.login-page__qr-corner[data-v-8e99a976]:before{background:linear-gradient(135deg, transparent 0 49%, #0000001a 50%, transparent 52%), linear-gradient(135deg, transparent 0 50%, var(--el-color-primary) 51%);clip-path:polygon(100% 0,100% 100%,0 0);content:"";transform-origin:100% 0;transition:transform .28s,box-shadow .28s;position:absolute;inset:0;box-shadow:-8px 8px 16px #1224381f}.login-page__qr-corner[data-v-8e99a976]:hover:before,.login-page__qr-corner.is-open[data-v-8e99a976]:before{transform:rotate(-5deg)translate(-2px,2px);box-shadow:-12px 12px 22px #12243833}.login-page__qr-mini[data-v-8e99a976]{z-index:1;opacity:.96;background:linear-gradient(#fff 0 0) 0 0/7px 7px no-repeat,linear-gradient(#fff 0 0) 19px 0/7px 7px no-repeat,linear-gradient(#fff 0 0) 0 19px/7px 7px no-repeat,repeating-linear-gradient(90deg,#fff 0 3px,#0000 3px 6px),repeating-linear-gradient(0deg,#fffc 0 3px,#0000 3px 6px);width:24px;height:24px;position:absolute;top:9px;right:9px}.login-page__card-body[data-v-8e99a976]{perspective:1200px;min-height:278px;display:grid;position:relative}.login-page__form-sheet[data-v-8e99a976],.login-page__qr-sheet[data-v-8e99a976]{backface-visibility:hidden;transform-style:preserve-3d;grid-area:1/1;transition:opacity .28s,transform .42s cubic-bezier(.22,1,.36,1)}.login-page__form-sheet[data-v-8e99a976]{transform-origin:100% 0}.login-page__card-body.is-qr .login-page__form-sheet[data-v-8e99a976]{opacity:0;pointer-events:none;transform:rotateY(-22deg)translate(-18px)}.login-page__qr-sheet[data-v-8e99a976]{border:1px solid var(--el-border-color-lighter);background:linear-gradient(135deg, #409eff14, #67c23a14), var(--el-bg-color);opacity:0;pointer-events:none;transform-origin:100% 0;border-radius:12px;flex-direction:column;justify-content:center;align-items:center;min-height:278px;display:flex;transform:rotateY(24deg)translate(28px)}.login-page__card-body.is-qr .login-page__qr-sheet[data-v-8e99a976]{opacity:1;pointer-events:auto;transform:rotateY(0)translate(0)}.login-page__qr-sheet strong[data-v-8e99a976]{color:var(--el-text-color-primary);margin-top:16px;font-size:16px}.login-page__qr-sheet p[data-v-8e99a976]{color:var(--el-text-color-secondary);margin:6px 0 12px;font-size:13px}.login-page__qr-box[data-v-8e99a976]{border:1px solid var(--el-border-color);min-width:132px;min-height:132px;box-shadow:var(--el-box-shadow-light);color:var(--el-text-color-secondary);background:#fff;border-radius:10px;place-items:center;padding:14px;font-size:14px;display:grid}.login-page__mode[data-v-8e99a976]{width:100%;margin-bottom:22px}.login-page__mode[data-v-8e99a976] .el-segmented__item{height:40px}.login-page__code-row[data-v-8e99a976]{grid-template-columns:minmax(0,1fr) 118px;gap:10px;width:100%;display:grid}.login-page__submit[data-v-8e99a976]{width:100%;height:42px;margin-top:12px;font-weight:700}@media (width<=1280px){.login-page__panel[data-v-8e99a976]{grid-template-columns:minmax(0,1fr) 430px}}@media (width<=960px){.login-page__panel[data-v-8e99a976]{grid-template-columns:1fr}.login-page__hero[data-v-8e99a976]{min-height:360px}.login-page__brand[data-v-8e99a976]{top:28px;left:32px}.login-page__account[data-v-8e99a976]{min-height:auto;padding:28px 24px 44px}}@media (width<=640px){.login-page[data-v-8e99a976]{display:block}.login-page__hero[data-v-8e99a976]{min-height:260px}.login-page__brand[data-v-8e99a976]{gap:10px;top:20px;left:18px}.login-page__brand-logo[data-v-8e99a976]{width:32px;height:32px}.login-page__account[data-v-8e99a976]{padding:18px 14px 32px}.login-page__card[data-v-8e99a976] .el-card__header{padding:26px 24px 6px}.login-page__card[data-v-8e99a976] .el-card__body{padding:24px}.login-page__code-row[data-v-8e99a976]{grid-template-columns:1fr}}
|
|
@@ -2,7 +2,7 @@ import { clearAuth as e, emitAuthExpired as t, getAccessToken as n, onAuthExpire
|
|
|
2
2
|
import { createRequestClient as i } from "../request.js";
|
|
3
3
|
import { t as a } from "./auth-C3RvRgcW.js";
|
|
4
4
|
import { i as o, n as s, r as c, t as l } from "./system-BbMsTIBR.js";
|
|
5
|
-
import { a as u, i as d, r as f } from "./route-items-
|
|
5
|
+
import { a as u, i as d, r as f } from "./route-items-DZFRXefX.js";
|
|
6
6
|
import { t as p } from "./_plugin-vue_export-helper-DvRHjpsZ.js";
|
|
7
7
|
import { createRouter as m, createWebHistory as h, useRoute as g, useRouter as _ } from "vue-router";
|
|
8
8
|
import v from "nprogress";
|
|
@@ -400,38 +400,38 @@ var Me = { class: "micro-app-page" }, Ne = {
|
|
|
400
400
|
let t = a(), n = ce(), r = y(""), p = null, v = o(() => ue(t.path)), T = o(() => {
|
|
401
401
|
let e = v.value;
|
|
402
402
|
return e ? n[e.name] : void 0;
|
|
403
|
-
}), O = o(() => le(t.path)), k = o(() => T.value?.title || v.value?.title || O.value?.title || "未知子应用"), A = o(() => T.value?.entry || v.value?.entry || O.value?.entry || "-"), j = o(() => T.value?.message ? T.value.message : O.value?.message ? O.value.message : v.value ? "子应用暂时无法访问,请稍后重试。" : "当前路径没有匹配到子应用配置,请检查应用配置里的路由前缀。"), M = o(() =>
|
|
403
|
+
}), O = o(() => le(t.path)), k = o(() => T.value?.title || v.value?.title || O.value?.title || "未知子应用"), A = o(() => T.value?.entry || v.value?.entry || O.value?.entry || "-"), j = o(() => T.value?.message ? T.value.message : O.value?.message ? O.value.message : v.value ? "子应用暂时无法访问,请稍后重试。" : "当前路径没有匹配到子应用配置,请检查应用配置里的路由前缀。"), M = o(() => T.value?.status === "error" || !!O.value || !!r.value || !v.value);
|
|
404
404
|
C(() => t.path, () => {
|
|
405
405
|
m(() => {
|
|
406
|
-
Ee(),
|
|
406
|
+
Ee(), N();
|
|
407
407
|
});
|
|
408
408
|
}, { immediate: !0 }), g(() => {
|
|
409
409
|
m(() => {
|
|
410
|
-
Ee(),
|
|
410
|
+
Ee(), N();
|
|
411
411
|
});
|
|
412
412
|
}), C(() => T.value?.status, (e) => {
|
|
413
|
-
e === "mounted" && (
|
|
413
|
+
e === "mounted" && (P(), r.value = "");
|
|
414
414
|
}), h(() => {
|
|
415
|
-
|
|
415
|
+
P();
|
|
416
416
|
});
|
|
417
|
-
function
|
|
418
|
-
|
|
417
|
+
function N() {
|
|
418
|
+
P(), r.value = "", v.value && (p = window.setTimeout(() => {
|
|
419
419
|
T.value?.status !== "mounted" && (r.value = "子应用暂时无法访问,请稍后重试。");
|
|
420
420
|
}, 15e3));
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function P() {
|
|
423
423
|
p !== null && (window.clearTimeout(p), p = null);
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function F() {
|
|
426
426
|
window.location.reload();
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function I() {
|
|
429
429
|
let e = A.value;
|
|
430
430
|
e && e !== "-" && window.open(e, "_blank", "noopener,noreferrer");
|
|
431
431
|
}
|
|
432
432
|
return (e, t) => {
|
|
433
433
|
let n = b("el-icon"), a = b("el-button");
|
|
434
|
-
return _(), l("div", Me, [
|
|
434
|
+
return _(), l("div", Me, [M.value ? (_(), l("div", Ne, [f(n, { class: "micro-app-page__icon" }, {
|
|
435
435
|
default: w(() => [f(S(ee))]),
|
|
436
436
|
_: 1
|
|
437
437
|
}), u("div", Pe, [
|
|
@@ -445,14 +445,14 @@ var Me = { class: "micro-app-page" }, Ne = {
|
|
|
445
445
|
u("div", Be, [f(a, {
|
|
446
446
|
type: "primary",
|
|
447
447
|
icon: S(D),
|
|
448
|
-
onClick:
|
|
448
|
+
onClick: F
|
|
449
449
|
}, {
|
|
450
450
|
default: w(() => [...t[4] ||= [d("重新加载", -1)]]),
|
|
451
451
|
_: 1
|
|
452
452
|
}, 8, ["icon"]), S(!1) && (T.value?.entry || v.value?.entry) ? (_(), s(a, {
|
|
453
453
|
key: 0,
|
|
454
454
|
icon: S(E),
|
|
455
|
-
onClick:
|
|
455
|
+
onClick: I
|
|
456
456
|
}, {
|
|
457
457
|
default: w(() => [...t[5] ||= [d(" 打开入口 ", -1)]]),
|
|
458
458
|
_: 1
|
|
@@ -463,7 +463,7 @@ var Me = { class: "micro-app-page" }, Ne = {
|
|
|
463
463
|
}, null, 8, Ve)]);
|
|
464
464
|
};
|
|
465
465
|
}
|
|
466
|
-
}), [["__scopeId", "data-v-
|
|
466
|
+
}), [["__scopeId", "data-v-eee80378"]]);
|
|
467
467
|
//#endregion
|
|
468
468
|
//#region src/main/router/route-items.ts
|
|
469
469
|
function Ue(e, t) {
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { MICRO_AUTH_EXPIRED_EVENT as e } from "./micro-contract.js";
|
|
2
|
-
import { a as t, c as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./chunks/main-
|
|
2
|
+
import { a as t, c as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./chunks/main-BRpmAK9d.js";
|
|
3
3
|
import { ApiError as d, RequestManager as f, createRequestClient as p, formatErrorMessage as m } from "./request.js";
|
|
4
4
|
import { a as h, i as g, n as _, r as v, t as y } from "./chunks/auth-C3RvRgcW.js";
|
|
5
5
|
import { t as b } from "./chunks/system-BbMsTIBR.js";
|
|
6
|
-
import { n as x, r as S, t as C } from "./chunks/route-items-
|
|
6
|
+
import { n as x, r as S, t as C } from "./chunks/route-items-DZFRXefX.js";
|
|
7
7
|
import { o as w } from "./chunks/config-Cd-9BYBy.js";
|
|
8
8
|
import { a as T, c as E, d as D, i as O, l as k, n as A, o as j, r as M, s as N, t as P, u as F } from "./chunks/sub-D7y3UaHp.js";
|
|
9
9
|
export { d as ApiError, j as DEFAULT_SUB_APP_BASE, r as HOME_TAB_PATH, e as MICRO_AUTH_EXPIRED_EVENT, x as MicroAppView, f as RequestManager, N as SUB_APP_NAME, E as SUB_APP_THEME_CHANGE_EVENT, O as applySubAppTheme, o as configureMorningfastRequestClient, c as createApi, _ as createMockLoginResult, v as createMockUserProfile, s as createMorningfastBaseRoutes, a as createMorningfastRouter, p as createRequestClient, C as createRoutesFromItems, F as createSubAppContext, T as createSubAppRouter, m as formatErrorMessage, n as http, l as mountMorningfastApp, M as mountSubApp, g as normalizeLoginResult, h as normalizeUserProfile, i as requestManager, k as resolveSubAppBasePath, w as setDefaultAppConfigs, u as setupAuthExpiredHandler, D as subAppContextKey, S as useAppStore, y as useAuthStore, P as useRequestClient, A as useSubAppContext, b as useSystemStore, t as useTabsStore };
|
package/dist/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./chunks/main-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./chunks/main-BRpmAK9d.js";
|
|
2
2
|
import { a as u, i as d, n as f, r as p, t as m } from "./chunks/auth-C3RvRgcW.js";
|
|
3
3
|
import { t as h } from "./chunks/system-BbMsTIBR.js";
|
|
4
|
-
import { n as g, r as _, t as v } from "./chunks/route-items-
|
|
4
|
+
import { n as g, r as _, t as v } from "./chunks/route-items-DZFRXefX.js";
|
|
5
5
|
import { o as y } from "./chunks/config-Cd-9BYBy.js";
|
|
6
6
|
export { n as HOME_TAB_PATH, g as MicroAppView, a as configureMorningfastRequestClient, s as createApi, f as createMockLoginResult, p as createMockUserProfile, o as createMorningfastBaseRoutes, i as createMorningfastRouter, v as createRoutesFromItems, t as http, c as mountMorningfastApp, d as normalizeLoginResult, u as normalizeUserProfile, r as requestManager, y as setDefaultAppConfigs, l as setupAuthExpiredHandler, _ as useAppStore, m as useAuthStore, h as useSystemStore, e as useTabsStore };
|
package/dist/sub.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as e } from "./chunks/route-items-
|
|
1
|
+
import { t as e } from "./chunks/route-items-DZFRXefX.js";
|
|
2
2
|
import { a as t, c as n, d as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "./chunks/sub-D7y3UaHp.js";
|
|
3
3
|
export { s as DEFAULT_SUB_APP_BASE, l as SUB_APP_NAME, n as SUB_APP_THEME_CHANGE_EVENT, i as applySubAppTheme, e as createRoutesFromItems, d as createSubAppContext, t as createSubAppRouter, c as mountSubApp, a as resolveSubAppBasePath, r as subAppContextKey, u as useRequestClient, o as useSubAppContext };
|