// 首先第一次进入该页面
mounted(){
this.articalType = this.$route.query.artical_type;
this.getArticalByType();
},
...
// 改变参数且不刷新页面
watch:{
// 监听参数是否发生变化
$route: {
handler() {
this.articalType = this.$route.query.artical_type;
this.getArticalByType();
},
//深度监听,同时也可监听到param参数变化
deep: true,
}
}