效果目标:
1. 在文章列表用 @click .native 绑定事件,并且带上参数的id
2.在methods 的方法里使用 this.$router.push() 的方法进行去跳转
//跳转到详情页面itemClickFn(id){// console.log(1234)this.$router.push({path:`/ArivleDetail?art_id=${id}`})}
注:
事件修饰符.native-> 给组件内根标签,绑定原生click点击事件,如果不绑定的话,就会报错
时间:2020-02-17 20:20:42
效果目标:
1. 在文章列表用 @click .native 绑定事件,并且带上参数的id
2.在methods 的方法里使用 this.$router.push() 的方法进行去跳转
//跳转到详情页面itemClickFn(id){// console.log(1234)this.$router.push({path:`/ArivleDetail?art_id=${id}`})}
注:
事件修饰符.native-> 给组件内根标签,绑定原生click点击事件,如果不绑定的话,就会报错