How to get Query params in VueJs 3?

I want to make search page which after i click its button will be redirect to another page. And this page will be like this


and my router index.js looks like this

const routers = [
      path: '/search',
      name: 'Search',
      component: SearchPage,
      props: route => ( { query: route.query.q } )

and the question is how do i get the query value in target page SearchPage, in VueJs 3?
this Answer still confusing me, because not using composition API and not in vuejs 3

164 thoughts on “How to get Query params in VueJs 3?”