形如:

http://localhost:8080/#/xxx?a=1&b=1

如果只是变化?后面的参数,页面组件并不会响应

解决办法:

使用watch监听路由$route对象属性的变化

watch: {
 '$route' (to, from) {
  // data数据操作
 }
}