路由配置如下:
const routes = [
{
name:'home',
path: '/',
component: home
},
{
name:'ssssgrid',
path: '/actionSheet',
component: actionSheet
},
];
export default new VueRouter({
mode: 'history',
routes
});
这是跳转的方法:
this.$router.push({
name:'ssssgrid',
param:{obj:'123'}
});
这是接收的方法
this.$route.params.obj
页面可以成功跳转无报错,但是取值显示为空
param -> params 传参写错了。