Vue router-link to= "/" jump problem

the problem is that I have three buttons, "router-link"
, I need to jump to the same page "/ index"
in the game page, use v-for to loop out the same three pages, and use Vshow = "active==index" to hide two of them to make a tab style.
I now need to click three buttons, and then jump to "/ index", each button displays the corresponding page, what should I do?
I found some answers on the Internet, saying that you can use to= "/ index?c" to pass the value when you click, but I don"t understand exactly how to do it. Please teach the boss how to teach Mengxin

.
<router-link to="/index">
Sep.16,2021

is similar to search,location.search in url


you can add variables. In index.vue , use $route.query to get

.
<router-link to="/index?type=...">

//index.vue
mounted(){
  this.type = this.$route.query.type
  ...
}

params

/index?id=1
//
$route.query.id //1
Menu