x-essential-lib 0.10.13 → 0.10.15
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.
|
@@ -3,12 +3,12 @@ import { t as __exportAll } from "./rolldown-runtime.c6i0pdwe.js";
|
|
|
3
3
|
//#region src/i18n/locales/en/index.ts
|
|
4
4
|
var en_exports = /* @__PURE__ */ __exportAll({ default: () => en_default });
|
|
5
5
|
var en_default = {
|
|
6
|
-
dlg: { common: {
|
|
6
|
+
"dlg": { common: {
|
|
7
7
|
cancel: "Cancel",
|
|
8
8
|
confirm: "Confirm",
|
|
9
9
|
responding: "Responding..."
|
|
10
10
|
} },
|
|
11
|
-
$vuetify: {
|
|
11
|
+
"$vuetify": {
|
|
12
12
|
badge: "Badge",
|
|
13
13
|
open: "Open",
|
|
14
14
|
close: "Close",
|
|
@@ -3,12 +3,12 @@ import { t as __exportAll } from "./rolldown-runtime.c6i0pdwe.js";
|
|
|
3
3
|
//#region src/i18n/locales/zhHans/index.ts
|
|
4
4
|
var zhHans_exports = /* @__PURE__ */ __exportAll({ default: () => zhHans_default });
|
|
5
5
|
var zhHans_default = {
|
|
6
|
-
dlg: { common: {
|
|
6
|
+
"dlg": { common: {
|
|
7
7
|
cancel: "取消",
|
|
8
8
|
confirm: "确定",
|
|
9
9
|
responding: "响应中..."
|
|
10
10
|
} },
|
|
11
|
-
$vuetify: {
|
|
11
|
+
"$vuetify": {
|
|
12
12
|
badge: "徽章",
|
|
13
13
|
open: "打开",
|
|
14
14
|
close: "关闭",
|
package/dist/index.d.ts
CHANGED
|
@@ -313,7 +313,7 @@ interface GlobalStates {
|
|
|
313
313
|
lastAppPath: Ref<string>;
|
|
314
314
|
views: Ref<string[]>;
|
|
315
315
|
}
|
|
316
|
-
declare function useMicroApp(globalStates: GlobalStates,
|
|
316
|
+
declare function useMicroApp(globalStates: GlobalStates, base?: boolean, customBack?: (m: RouteMeta) => void): void;
|
|
317
317
|
//#endregion
|
|
318
318
|
//#region src/composables/permission.d.ts
|
|
319
319
|
declare function usePermission(): {
|
package/dist/index.js
CHANGED
|
@@ -666,7 +666,10 @@ async function onBeforeEach(to, from, lastAppPath) {
|
|
|
666
666
|
const orgId = to.query.orgId;
|
|
667
667
|
if (to.path.startsWith("/passport/")) onBeforeChange(to.path, from.path, lastAppPath);
|
|
668
668
|
else if (to.path.startsWith("/main")) try {
|
|
669
|
-
if (!orgId)
|
|
669
|
+
if (!orgId) return {
|
|
670
|
+
path: `/main/${Date.now()}`,
|
|
671
|
+
query: { orgId: "public" }
|
|
672
|
+
};
|
|
670
673
|
await syncOrg(orgId);
|
|
671
674
|
await syncPermission(orgId);
|
|
672
675
|
onBeforeChange(to.path, from.path, lastAppPath);
|
|
@@ -748,7 +751,7 @@ function clearViews(views) {
|
|
|
748
751
|
|
|
749
752
|
//#endregion
|
|
750
753
|
//#region src/composables/microApp.ts
|
|
751
|
-
function useMicroApp(globalStates,
|
|
754
|
+
function useMicroApp(globalStates, base, customBack) {
|
|
752
755
|
const { t } = useI18n();
|
|
753
756
|
const route = useRoute();
|
|
754
757
|
const router = useRouter();
|
|
@@ -765,16 +768,6 @@ function useMicroApp(globalStates, syncLocale, base, customBack) {
|
|
|
765
768
|
watchEffect(async () => {
|
|
766
769
|
await theme.change(finalDark.value ? "dark" : "light");
|
|
767
770
|
});
|
|
768
|
-
let pending = true;
|
|
769
|
-
router.beforeEach(async (to, from) => {
|
|
770
|
-
await syncLocale();
|
|
771
|
-
pending = false;
|
|
772
|
-
return onBeforeEach(to, from, lastAppPath.value);
|
|
773
|
-
});
|
|
774
|
-
watch(locale, async () => {
|
|
775
|
-
if (pending) return;
|
|
776
|
-
await syncLocale();
|
|
777
|
-
});
|
|
778
771
|
provideDark(finalDark);
|
|
779
772
|
provideLocale(locale);
|
|
780
773
|
provideActiveOrg(activeOrg);
|
|
@@ -844,7 +837,10 @@ function useMicroApp(globalStates, syncLocale, base, customBack) {
|
|
|
844
837
|
if (!routeMeta) return;
|
|
845
838
|
if (routeMeta.level === 0) navigator?.Backbutton?.goHome(() => {}, () => {});
|
|
846
839
|
else if (customBack) customBack(routeMeta);
|
|
847
|
-
else if (routeMeta.back) await router.replace({
|
|
840
|
+
else if (routeMeta.back) await router.replace({
|
|
841
|
+
path: routeMeta.back,
|
|
842
|
+
query: { orgId: activeOrg.value }
|
|
843
|
+
});
|
|
848
844
|
}
|
|
849
845
|
async function onKeyDown(e) {
|
|
850
846
|
if (e.key === "Escape") {
|
|
@@ -1692,8 +1688,8 @@ const install = (app) => {
|
|
|
1692
1688
|
//#endregion
|
|
1693
1689
|
//#region src/i18n/index.ts
|
|
1694
1690
|
async function loadLocaleMessageEssential(locale) {
|
|
1695
|
-
if (locale === "en") return (await import("./i18n-en.
|
|
1696
|
-
else if (locale === "zhHans") return (await import("./i18n-zhHans.
|
|
1691
|
+
if (locale === "en") return (await import("./i18n-en.fcyirt0q.js").then((n) => n.t)).default;
|
|
1692
|
+
else if (locale === "zhHans") return (await import("./i18n-zhHans.kjj6z3dm.js").then((n) => n.t)).default;
|
|
1697
1693
|
else throw new Error(`invalid locale=${locale}`);
|
|
1698
1694
|
}
|
|
1699
1695
|
|