How to solve the problem that the vue-route route jumps and transfers the value to the new page, and the refresh data becomes object in the new page?

first pass the value through the route to the new page, and then I want to refresh the new page. I will find that the value of the original received route becomes object

.

clipboard.png

clipboard.png

clipboard.png

clipboard.png

could you tell me how to solve this problem?

Mar.12,2021

try this:

JSON.parse($route.query.ip)

how to solve the problem


you can save it in session to try


have you solved it?


first: a simple and rude way to store parameters directly in session or localStorage
second: when passing parameters to router, serialize the object parameters directly with JSON.stringify (item), so there will be no problem when refreshing. When used in the vue interface, use JSON.parse (item) to deserialize

.
Menu