How do vue parent routes pass object details to child routes?

here is a requirement. Click an item in the parent route to enter the child route details page. Can the object information obtained in the parent route be passed directly to the child route in this step?
it seems to me that the document can only pass params or query,. Is it possible to pass the details of an object?
ask for help, thank you!

Mar.12,2021

at least 3 ways, for reference only
1, global eventBus policy
2, vuex
3, localstorage


actually many methods query router.push ({path:'/ user', query: {userId: JOSN.stringify (str)}})


<template>
    <div>
      <router-link :to="{ name: 'twdetails', params: { obj: a }}"  >
         
      </router-link>
    </div>
</template>

<script type="text/ecmascript-6">
    export default {
      data(){
        return{
          a:{
          //
          }
        }
      }
    }
</script>

emmmmm, try it so that you can not, ^ _ ^

Menu