We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ff4de4 commit 7f55411Copy full SHA for 7f55411
src/components/view.js
@@ -69,6 +69,17 @@ export default {
69
matched.instances[name] = vnode.componentInstance
70
}
71
72
+ // register instance in init hook
73
+ // in case kept-alive component be actived when routes changed
74
+ data.hook.init = (vnode) => {
75
+ if (vnode.data.keepAlive &&
76
+ vnode.componentInstance &&
77
+ vnode.componentInstance !== matched.instances[name]
78
+ ) {
79
+ matched.instances[name] = vnode.componentInstance
80
+ }
81
82
+
83
// resolve props
84
let propsToPass = data.props = resolveProps(route, matched.props && matched.props[name])
85
if (propsToPass) {
0 commit comments