We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[vue]
The text was updated successfully, but these errors were encountered:
activated钩子函数:在keep-alive模式下(vue对象存活【存在页面缓存】时,只要进入页面就会立即触发activated函数,用于多次访问页面时进行对页面数据进行初始化等操作)
created/onLoad钩子函数:同样的,created/onLoad钩子也可以用来初始化页面和数据使用,但仅在首次创建或重启时触发,在一个生命周期内,created/OnLoad仅会触发一次!
beforeCreate(){ console.log("创建前===>胚胎") }, created(){ console.log("创建完成===>出生") }, beforeMount(){ console.log("挂载前===>幼儿园") }, activated(){ console.log("激活===>课外班:知识升级") }, deactivated(){ console.log("停止===>逃课打架:自暴自弃(多用于离开页面,比如切换页签(?))") }, mounted(){ console.log("挂载结束===>小学:知识消化(多用于配合监听及跨页面数据加载使用)") }, beforeUpdate(){ console.log("更新前===>初中:知识迭带(多用于异步更新前对页面数据的处理)") }, updated(){ console.log("更新完成===>高中:知识巩固") }, beforeDestroy(){ console.log("销毁前===>大学:思维碰撞(多用于关闭页面时对页面数据的操作)") }, destroyed(){ console.log("销毁完成===>毕业:现实世界(销毁页面时的操作,比如数据缓存清空等)") }
Sorry, something went wrong.
No branches or pull requests
[vue]
The text was updated successfully, but these errors were encountered: