vue3.0路由报错-No active route record was found. Are you missing a <router-view> com

1,583 阅读1分钟

对于强迫症的我来说出现这个提示真的看着难受

onBeforeRouteUpdate((to, from) => {     
       // console.log("=====");      
      // console.log('路由监听', to); 
       // store.commit('updatecurrentPath', to.path) 
  });

出现的原因就是vue3.0路由监测路由的方式改为了

onBeforeRouteUpdate我用了但是里面都被注释了就会提示把这个删除或者整体注释就好了