router.beforeEach((to ,from ,next)=>{ document.title=to.matched[0].meta.title; next() //必须写,否则无法跳转。 })