Vue this page is transferred to this page. The address will change, but the page will not change.

vue the list on this page clicks to jump to this page, the address will change, but the page will not change

 <div class="bt" >
        <li v-for="(lists, index) in $store.state.listNews" :key="index">
          <router-link class="inner" :to="{ path: "/words", query: {index} }">
            <div class="wrap_l">
              

{{ lists.title }}

<div class="boot"> <span>{{ lists.src }}</span> </div> </div> <div class="wrap_r"> <img :src="lists.pic" alt="loading"> </div> </router-link> </li> </div>
Apr.19,2022

this is because you are jumping to this page, and vue will reuse your components by default, so it will not be refreshed.
the correct thing to do is to listen for route changes, then do response operations, get data, etc.

  

this page only refreshes the current page. If you want to operate on this page, you can use this.$route.query. Parameter to get the value of the parameter, and then filter and display the data (for example, modify v-for: "(lists,index) in filtering method name").

Menu