環(huán)境"vue": "^1.0.14""vue-router": "0.7.13",路由1'/about/:aa': { name: 'about', component: require('./components/about.vue') },跳轉(zhuǎn)1this.$router.go({name: 'about', params: {aa: 11}});結(jié)果1以下方式,能夠使用{{$route.params.aa}}獲取到值。路由2'/about': { name: 'about', component: require('./components/about.vue') },跳轉(zhuǎn)2this.$router.go({name: 'about', params: {aa: 11}});結(jié)果2那么{{$route.params.aa}}獲取不到值。query方式能夠傳遞一個對象,但是會拼接在URL上面。期望如果我想通過params傳遞一個對象,應(yīng)該如何使用?
Vue router 1.0 go方法如何傳遞更多的參數(shù)?
森林海
2018-12-28 22:19:55