Data loss after vue refresh page

using browser refresh to redirect the details page via params dynamic routing will result in the loss of all data (the whole subcomponent is not displayed). What is the problem?

{
    path: "/detail/:id",
    name: "detail",
    component: Detail
  }
<router-link :to="{name:"detail",params:{id:item.id}}"
                   tag="div"
                   v-for="item in items"
                   :key="item.name"
                   >
</router-link>
Mar.29,2022

is historyApiFallback configured?


params is saved in memory, and of course there is no refresh. For pure routing parameters, use query.


you still need to add the query parameter. Isn't that what happens with normal details

?
Menu