How get query parameter in Vue

If you have url something like this htttp://mysite.com/products?page=2#vendor/2 how do you get the vendor id

You can use the following code

$this.route.params.id