javascript - vue2.0 route passes parameters. The parameter received when jumping to the page is undefind, but it is obtained after refreshing. Why?
淡淡烟草味
淡淡烟草味 2017-05-19 10:14:38
0
2
505

This is an id parameter passed by the jump page

This is the page that receives parameters

This is the result of jumping to the past

This is the id obtained after refreshing

淡淡烟草味
淡淡烟草味

reply all(2)
Ty80

Put it in mounted and try it

阿神

This $route$router 不是一个东西吧。。
一边都用 this.$route.push({ path: '/yourpath', query: {id: 123})
另外一边直接 console.log(this.$route.query.id)

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!