Using `$ router.push () `, can you pass an object by passing parameters?

use $router.push () , pass the parameter:

this.$router.push({name: "finance-list", query: {selected_order: response.data} })

this response.data is a large object. Can you usually pass it like this? Or is it just passing its id?

Mar.15,2021

data generally go store


depends on your usage: ide/essentials/navigation.html" rel=" nofollow noreferrer "> route.push ()

< hr >

Update: as passers-by said, it would be better to use store to pass parameters here (I didn't read the question carefully before -! ).


Project designers try not to send a response data, but directly use iD, unless it is some relatively small data. In this case, you can use JSON.stringfy (), but here you suggest using ID


I don't understand. Can't you get response.data directly from the routing destination component directly from the backend API?

Menu