官方文档说明:https://router.vuejs.org/zh/guide/essentials/dynamic-matching.html
解决方案:
1).将公共组件的created方法放入到一个新的函数中,例如 init()
2).使用@Watch监控路由, @Watch($route)
3).在created和watch里面分别使用 init()函数即可
例如
@Watch('$route')
onRouteChange(to:stiring,from:string){
this.init().then(){
}.catch()
}