vue-router学习

JS push

        goTo(){
            this.$router.push({ name : 'zzsptfpJs', params: { userId: 123, postId: '456' }})
        }

router.js

  // 动态路径参数 以冒号开头
    { path: '/user/:id', component: User }

 

    {
        path: '/zzsptfpJs:userId/post:postId',
        name: 'zzsptfpJs',
        component: zzsptfpJs,
        meta: {title:'增值税普通发票(卷式)',keyword:'增值税普通发票(卷式)',description:'增值税普通发票(卷式)'},
    }, 

 

结果

http://192.168.0.221:8080/#/zzsptfpJs123/post456

 

 

 

posted @ 2019-02-21 11:11  LaLaLa_heng  阅读(156)  评论(0编辑  收藏  举报