src/views/home/index.vue @@ -28,8 +28,8 @@ } }, watch:{ //监听路由 $route(to,from){ if(to.path == '/postDetails'){ $route(to, from) { if (to.path === '/postDetails') { this.isShow = false } }