ソースを参照

兼容跳转本身页面

pengyh 1 年間 前
コミット
ed3bc682d8
1 ファイル変更6 行追加1 行削除
  1. 6 1
      src/App.vue

+ 6 - 1
src/App.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
   <div id="app">
   <div id="app">
-    <router-view />
+    <router-view :key="key"/>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -10,6 +10,11 @@ export default {
   data() {
   data() {
     return {}
     return {}
   },
   },
+	 computed:{
+	  key(){
+	    return this.$route.name !== undefined? this.$route.name + +new Date(): this.$route + +new Date()
+	  }
+	},
   methods: {}
   methods: {}
 }
 }
 </script>
 </script>