当页面应用了keep-alive,那么进入这个页面和离开这个页面都只走生命周期activated,其余不走。
beforeCreate(){
console.log("beforeCreate");
},
created(){
console.log("created");
},
activated(){
console.log("activated"); //下次进入页面,只打印出activatd
},
activitty(){
console.log("activit");
},
mounted() {
console.log(666);
},
beforeDestroyed() {
console.log(666);
},
网友评论