x-essential-lib 0.10.26 → 0.10.28
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 +6 -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(
|
|
316
|
+
declare function useRouteChange(onRouteChange: () => Promise<void>): {
|
|
317
317
|
syncOrg: () => Promise<boolean>;
|
|
318
318
|
};
|
|
319
319
|
//#endregion
|
package/dist/index.js
CHANGED
|
@@ -815,7 +815,7 @@ function PullPermission(request) {
|
|
|
815
815
|
|
|
816
816
|
//#endregion
|
|
817
817
|
//#region src/composables/routeChange.ts
|
|
818
|
-
function useRouteChange(
|
|
818
|
+
function useRouteChange(onRouteChange) {
|
|
819
819
|
const route = useRoute();
|
|
820
820
|
const router = useRouter();
|
|
821
821
|
async function syncOrg() {
|
|
@@ -843,11 +843,11 @@ function useRouteChange(routeChange) {
|
|
|
843
843
|
return false;
|
|
844
844
|
}
|
|
845
845
|
}
|
|
846
|
-
|
|
847
|
-
await
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
|
|
846
|
+
watch([() => route.path, () => route.query], async () => {
|
|
847
|
+
await onRouteChange();
|
|
848
|
+
}, {
|
|
849
|
+
deep: true,
|
|
850
|
+
immediate: true
|
|
851
851
|
});
|
|
852
852
|
return { syncOrg };
|
|
853
853
|
}
|