export default function (to, from) { // to是目标路由对象,from是来源路由对象 console.log('进入路由中间件,目标路由:', to.path,"当前路由:",from.path); }