2024-07-20 08:31:05 +08:00
|
|
|
import { useRouter } from 'vue-router';
|
|
|
|
|
2024-07-30 21:10:28 +08:00
|
|
|
import { useTabbarStore } from '@vben/stores';
|
2024-07-20 08:31:05 +08:00
|
|
|
|
|
|
|
export function useRefresh() {
|
|
|
|
const router = useRouter();
|
2024-07-30 21:10:28 +08:00
|
|
|
const tabbarStore = useTabbarStore();
|
2024-07-20 08:31:05 +08:00
|
|
|
|
2024-08-04 21:53:44 +08:00
|
|
|
async function refresh() {
|
|
|
|
await tabbarStore.refresh(router);
|
2024-07-20 08:31:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
refresh,
|
|
|
|
};
|
|
|
|
}
|