File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
14
14
watch ,
15
15
Slot ,
16
16
VNode ,
17
+ onActivated ,
17
18
} from 'vue'
18
19
import {
19
20
RouteLocationNormalized ,
@@ -28,6 +29,7 @@ import {
28
29
import { assign , isBrowser } from './utils'
29
30
import { warn } from './warning'
30
31
import { isSameRouteRecord } from './location'
32
+ import { onBeforeRouteLeave } from './navigationGuards'
31
33
32
34
export interface RouterViewProps {
33
35
name ?: string
@@ -72,11 +74,11 @@ export const RouterViewImpl = /*#__PURE__*/ defineComponent({
72
74
73
75
const viewRef = ref < ComponentPublicInstance > ( )
74
76
const noRender = ref ( false )
75
-
77
+
76
78
onBeforeRouteLeave ( ( ) => {
77
79
noRender . value = true
78
80
} )
79
-
81
+
80
82
onActivated ( ( ) => {
81
83
noRender . value = false
82
84
} )
You can’t perform that action at this time.
0 commit comments