xcx 4 anni fa
parent
commit
a36d9ba543
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6
    0
      src/pages/index.vue

+ 6
- 0
src/pages/index.vue Vedi File

@@ -34,6 +34,12 @@ export default {
34 34
     }
35 35
   },
36 36
   mounted () {
37
+    window.addEventListener('hashchange', () => {
38
+      let currentPath = window.location.hash.slice(1)
39
+      if (this.$route.path !== currentPath) {
40
+        this.$router.push(currentPath)
41
+      }
42
+    }, false)
37 43
     this.$nextTick(() => {
38 44
     })
39 45
   },