跟vue2的顺序相同,只是有些函数名不一样
parent setup
parent beforeCreate
parent created
parent beforeMount
child setup
child beforeCreate
child created
child beforeMount
child mounted
parent mounted
parent beforeUnmount
child beforeUnmount
child unmounted
parent unmounted
相对应的组合式api:
https://v3.cn.vuejs.org/api/composition-api.html#%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F%E9%92%A9%E5%AD%90
网友评论