#3935·vue-router

How to get the currently matching path

Author: tbontb-iaqCreated Sep 1, 2025Updated Sep 1, 2025

Is there some way to get the path that matches the current route level? For example, when I nest a `user/:id` page in the `user` page and the current path is `/user/123`, then I want to get `/user` on the `user` page and `/user/123` on the `user/:id` page.