watch:{
'$store.getters.getUserId' : function(val){
//获取Id
let userId = this.$store.getters.getUserId;
console.log("当前用户:" + userId + "ID:" + val);
},
$route:{
handler:function (val, oldVal) {
console.log("路由发生了变化 原来路由:" );
console.log(oldVal);
console.log("新路由:" );
console.log(val);
}
}
}