x-essential-lib 0.10.29 → 0.10.30

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(onRouteChange: () => Promise<void>): {
316
+ declare function useRouteChange(onRouteChange?: () => Promise<void>): {
317
317
  syncOrg: () => Promise<boolean>;
318
318
  };
319
319
  //#endregion
package/dist/index.js CHANGED
@@ -843,12 +843,14 @@ function useRouteChange(onRouteChange) {
843
843
  return false;
844
844
  }
845
845
  }
846
- onBeforeMount(async () => {
847
- await onRouteChange();
848
- });
849
- watch([() => route.path, () => route.query], async () => {
850
- await onRouteChange();
851
- }, { deep: true });
846
+ if (onRouteChange) {
847
+ onBeforeMount(async () => {
848
+ await onRouteChange();
849
+ });
850
+ watch(() => route.path, async () => {
851
+ await onRouteChange();
852
+ });
853
+ }
852
854
  return { syncOrg };
853
855
  }
854
856
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
- "version": "0.10.29",
3
+ "version": "0.10.30",
4
4
  "files": [
5
5
  "dist"
6
6
  ],