x-essential-lib 0.10.26 → 0.10.27

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/index.d.ts CHANGED
@@ -313,7 +313,7 @@ declare function usePermission(): {
313
313
  };
314
314
  //#endregion
315
315
  //#region src/composables/routeChange.d.ts
316
- declare function useRouteChange(routeChange: () => Promise<void>): {
316
+ declare function useRouteChange(onRouteChange: () => Promise<void>): {
317
317
  syncOrg: () => Promise<boolean>;
318
318
  };
319
319
  //#endregion
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import { Fragment, Transition, computed, createBlock, createCommentVNode, create
4
4
  import { useI18n } from "vue-i18n";
5
5
  import { useDisplay, useTheme } from "vuetify";
6
6
  import axios from "axios";
7
- import { useRoute, useRouter } from "vue-router";
7
+ import { onBeforeRouteUpdate, useRoute, useRouter } from "vue-router";
8
8
  import { getErrorMessage } from "x-error-lib";
9
9
  import { createAxios as createAxios$1, messageError as messageError$1 } from "x-essential-lib";
10
10
 
@@ -815,7 +815,7 @@ function PullPermission(request) {
815
815
 
816
816
  //#endregion
817
817
  //#region src/composables/routeChange.ts
818
- function useRouteChange(routeChange) {
818
+ function useRouteChange(onRouteChange) {
819
819
  const route = useRoute();
820
820
  const router = useRouter();
821
821
  async function syncOrg() {
@@ -844,10 +844,10 @@ function useRouteChange(routeChange) {
844
844
  }
845
845
  }
846
846
  onBeforeMount(async () => {
847
- await routeChange();
847
+ await onRouteChange();
848
848
  });
849
- watch(() => route.path, async () => {
850
- await routeChange();
849
+ onBeforeRouteUpdate(async () => {
850
+ await onRouteChange();
851
851
  });
852
852
  return { syncOrg };
853
853
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
- "version": "0.10.26",
3
+ "version": "0.10.27",
4
4
  "files": [
5
5
  "dist"
6
6
  ],