Forráskód Böngészése

兼容跳转本身页面

pengyh 1 éve
szülő
commit
ed3bc682d8
1 módosított fájl, 6 hozzáadás és 1 törlés
  1. 6 1
      src/App.vue

+ 6 - 1
src/App.vue

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