202010-09 vue 解决addRoutes多次添加路由重复的操作 我就废话不多说了,大家还是直接看代码吧~importVuefrom'vue'importRouterfrom'vue-router'Vue.use(Router)constcreateRouter=()=>newRouter({mode:'history',routes:[]})constrouter=createRouter()exportfunctionresetRouter(){constnewRouter=createRouter()router.matcher=newRouter.matcher//therelevantpart}exportdefaultrouter找老外的文档解决的问题,在登出的模块调用resetRouter方... 继续阅读 >