lily-white / learn-toutiao

0 stars 0 forks source link

vue router 参数 #3

Open lily-white opened 6 years ago

lily-white commented 6 years ago

router里用 path: '/article/:id', link里用:to="'/article/' + item.id" 取值用this.$route.params.id

lily-white commented 6 years ago

router里用path: '/article', link里用:to="{path:'article', query: {articleId: item.id}}" 取值用this.$route.query.articleId