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 +1 -1
- package/dist/index.js +8 -6
- package/package.json +1 -1
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
|
|
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
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
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
|
|