Vue2
Vue3
Appearance
function useRouter(): Router;
Returns the router instance. Equivalent to using $router inside templates.
$router
Router