使用watch监听路由变化和watch监听对象的实例 一、watch监听路由变化解决办法:exportdefault{data(){return{}},watch:{"$route":"getPath"//监听事件},meth watch监听路由变化