Browse Source

处理地址发生变化但页面不请求数据的问题

reghao 4 years ago
parent
commit
02873919f3
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/views/video/video.vue

+ 2 - 3
src/views/video/video.vue

@@ -142,8 +142,7 @@ export default {
       colsWidth: 8
       colsWidth: 8
     }
     }
   },
   },
-  watch: {
-    // TODO 监听地址栏路由,发生变化时重新加载当前页面
+  /*  watch: {
     $route: {
     $route: {
       handler(newName, oldName) {
       handler(newName, oldName) {
         console.log(newName.path)
         console.log(newName.path)
@@ -152,7 +151,7 @@ export default {
       },
       },
       deep: true
       deep: true
     }
     }
-  },
+  },*/
   created() {
   created() {
     // 获取 url 上的 path 参数
     // 获取 url 上的 path 参数
     this.videoId = this.$route.params.id
     this.videoId = this.$route.params.id