瀏覽代碼

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>