利用路由守卫来进行单独设置 beforeRouteEnter(to, from, next) { window.document.body.style.backgroundColor = "rgb(242,244,247)"; next(); }, beforeRouteLeave(to, from, next) { window.document.body.style.backgroundColor = ""; next(); },