admin-vben/packages/effects/hooks/src/use-refresh.ts

17 lines
295 B
TypeScript

import { useRouter } from 'vue-router';
import { useTabbarStore } from '@vben/stores';
export function useRefresh() {
const router = useRouter();
const tabbarStore = useTabbarStore();
async function refresh() {
await tabbarStore.refresh(router);
}
return {
refresh,
};
}