Element-UI跳转页面路由配置

1

this.$router.push({path:'/stu/update/'+id})

2

{
        path: 'update/:id',
        name: '修改学生信息',
        hidden: true,
        //转到页面
        component: () => import('@/views/stu/updateStu'),
        meta: {
          title: '修改学生信息', icon: 'el-icon-s-custom',
          roles: ['admin', 'coll','instr']
        }
      },

3

 created(){
    if(this.$route.params && this.$route.params.id){
            const id = this.$route.params.id
        }
 },

猜你喜欢

转载自blog.csdn.net/qq_41835813/article/details/110263142