x-essential-lib 0.10.13 → 0.10.14
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
|
@@ -748,7 +748,7 @@ function clearViews(views) {
|
|
|
748
748
|
|
|
749
749
|
//#endregion
|
|
750
750
|
//#region src/composables/microApp.ts
|
|
751
|
-
function useMicroApp(globalStates,
|
|
751
|
+
function useMicroApp(globalStates, base, customBack) {
|
|
752
752
|
const { t } = useI18n();
|
|
753
753
|
const route = useRoute();
|
|
754
754
|
const router = useRouter();
|
|
@@ -765,16 +765,6 @@ function useMicroApp(globalStates, syncLocale, base, customBack) {
|
|
|
765
765
|
watchEffect(async () => {
|
|
766
766
|
await theme.change(finalDark.value ? "dark" : "light");
|
|
767
767
|
});
|
|
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
768
|
provideDark(finalDark);
|
|
779
769
|
provideLocale(locale);
|
|
780
770
|
provideActiveOrg(activeOrg);
|
|
@@ -844,7 +834,10 @@ function useMicroApp(globalStates, syncLocale, base, customBack) {
|
|
|
844
834
|
if (!routeMeta) return;
|
|
845
835
|
if (routeMeta.level === 0) navigator?.Backbutton?.goHome(() => {}, () => {});
|
|
846
836
|
else if (customBack) customBack(routeMeta);
|
|
847
|
-
else if (routeMeta.back) await router.replace({
|
|
837
|
+
else if (routeMeta.back) await router.replace({
|
|
838
|
+
path: routeMeta.back,
|
|
839
|
+
query: { orgId: activeOrg.value }
|
|
840
|
+
});
|
|
848
841
|
}
|
|
849
842
|
async function onKeyDown(e) {
|
|
850
843
|
if (e.key === "Escape") {
|
|
@@ -1692,8 +1685,8 @@ const install = (app) => {
|
|
|
1692
1685
|
//#endregion
|
|
1693
1686
|
//#region src/i18n/index.ts
|
|
1694
1687
|
async function loadLocaleMessageEssential(locale) {
|
|
1695
|
-
if (locale === "en") return (await import("./i18n-en.
|
|
1696
|
-
else if (locale === "zhHans") return (await import("./i18n-zhHans.
|
|
1688
|
+
if (locale === "en") return (await import("./i18n-en.fcyirt0q.js").then((n) => n.t)).default;
|
|
1689
|
+
else if (locale === "zhHans") return (await import("./i18n-zhHans.kjj6z3dm.js").then((n) => n.t)).default;
|
|
1697
1690
|
else throw new Error(`invalid locale=${locale}`);
|
|
1698
1691
|
}
|
|
1699
1692
|
|