Use useRoute to get the path of the current page.
useRoute
const route = useRoute() console.log(route.path)