]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
refactor: remove unused imports and code (#364)
authorbu <ibushuai@gmail.com>
Sat, 11 Jul 2020 17:12:46 +0000 (01:12 +0800)
committerGitHub <noreply@github.com>
Sat, 11 Jul 2020 17:12:46 +0000 (19:12 +0200)
playground/views/ComponentWithData.vue
playground/views/Home.vue
playground/views/Nested.vue
playground/views/NestedWithId.vue
playground/views/NotFound.vue
playground/views/User.vue

index 9a989f1419dbf8aba8b681ce26c9404f5ef9f067..10a0b3991e1272da8ab3a78abfda078a4bf1bea0 100644 (file)
@@ -6,7 +6,7 @@
 </template>
 
 <script>
-import { defineComponent, toRefs, reactive, inject } from 'vue'
+import { defineComponent, toRefs, reactive } from 'vue'
 import { getData, delay } from '../api'
 import { onBeforeRouteUpdate } from '../../src'
 
index 79d9dc62d527cfa73c176da50ba09157668dde9d..5a2fd5cf36921406ee5bbfc34ff09db68fe790f2 100644 (file)
@@ -9,8 +9,7 @@
 </template>
 
 <script>
-import { defineComponent, getCurrentInstance, inject, ref } from 'vue'
-// import { guardSymbol } from '../../src/components/View'
+import { defineComponent, getCurrentInstance, ref } from 'vue'
 
 export default defineComponent({
   name: 'Home',
@@ -22,10 +21,6 @@ export default defineComponent({
 
   setup() {
     const me = getCurrentInstance()
-    // const registerGuard = inject(guardSymbol)
-    // console.log('calling setup in Home')
-    // await registerGuard(me)
-    // emit('registerGuard', getCurrentInstance())
 
     function log(value) {
       console.log(value)
index d1a337a32c59c59916efac6a7470b3c6ecae92f3..514819b6e39ead28aa4d3fa2dbf47b0a2342676a 100644 (file)
 
 <script>
 import { defineComponent, inject, provide } from 'vue'
-// import { guardSymbol } from '../../src/components/View'
 
 export default defineComponent({
   name: 'Nested',
   setup() {
     const level = inject('level', 1)
     provide('level', level + 1)
-    // const registerGuard = inject(guardSymbol)
-    // await registerGuard()
-    // console.log('done waiting')
 
     return {
       level,
index 764aa94f3c4bb0c692693f31b12796533e4fc415..b2f79697a7c6d79684d95e8d81d1b443eec3dcd7 100644 (file)
@@ -19,7 +19,6 @@
 
 <script>
 import { defineComponent, inject, provide } from 'vue'
-// import { guardSymbol } from '../../src/components/View'
 
 export default defineComponent({
   props: ['id'],
@@ -27,9 +26,6 @@ export default defineComponent({
   setup(props) {
     const level = inject('level', 1)
     provide('level', level + 1)
-    // const registerGuard = inject(guardSymbol)
-    // await registerGuard()
-    // console.log('done waiting')
 
     return {
       props,
index 31e3bb02d1279ce89f43efd280e2873f9dd087dc..a902a7f8e526285d88abca27b1da1c3e3a18b196 100644 (file)
@@ -3,7 +3,7 @@
 </template>
 
 <script>
-import { defineComponent, inject } from 'vue'
+import { defineComponent } from 'vue'
 import { useRoute } from '../../src'
 
 export default defineComponent({
index af3e663565b3db8656751e34cf5f2cb018169352..aa9e4be538cd63cef43f1a45745d94ca9d8f74f9 100644 (file)
@@ -3,7 +3,7 @@
 </template>
 
 <script>
-import { defineComponent, inject } from 'vue'
+import { defineComponent } from 'vue'
 
 export default defineComponent({
   name: 'User',