# useGo

页面切换 page switch

## Usage

```vue
<script lang="ts" setup>
  import { useGo } from '@eciol/hooks';

  const go = useGo();
  go('/');
</script>
```

## Type Declarations

```ts
type PathAsPageEnum<T> = T extends {
  path: string;
}
  ? T & {
      path: string;
    }
  : T;
type RouteLocationRawEx = PathAsPageEnum<RouteLocationRaw>;
declare function useGo(_router?: Router): (opt?: RouteLocationRawEx, isReplace?: boolean) => void;
```

# useRedo

刷新当前页面 redo current page

## Usage

```vue
<script lang="ts" setup>
  import { useRedo } from '@eciol/hooks';

  const redo = useRedo();
  redo();
</script>
```

## Type Declarations

```ts
type PathAsPageEnum<T> = T extends {
  path: string;
}
  ? T & {
      path: string;
    }
  : T;
type RouteLocationRawEx = PathAsPageEnum<RouteLocationRaw>;

declare const useRedo: (_router?: Router) => () => Promise<boolean>;
```
