keep-alive,activated,deactivated

原文链接:https://www.jianshu.com/p/0272c0fe9392
要点:
1.当组件在 内被切换,它的 activated 和 deactivated 这两个生命周期钩子函数将会被对应执行。
2.进入组件a时执行activated执行,离开时执行deactivated
3.keep-alive内的组件,(被缓存的组件),首次仅加载一次created和mouted

猜你喜欢

转载自blog.csdn.net/weixin_44494811/article/details/101572351