소스 검색

fix: TableList add router watch

kokoroli 6 년 전
부모
커밋
a9b9614c4b
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      src/views/list/TableList.vue

+ 6 - 0
src/views/list/TableList.vue

@@ -39,6 +39,12 @@ export default {
       this.record = ''
       this.currentComponet = 'List'
     }
+  },
+  watch: {
+    '$route.path' () {
+      this.record = ''
+      this.currentComponet = 'List'
+    }
   }
 }
 </script>