| 原方法 |升级后 |
|beforeCreate|升级后 setup|
| created 升级后 setup |
beforemounted 升级后 onbeforemount
mounted升级后 onmounted
beforeupdata升级后 onbeforeupdata
updated 升级后 onupdated
beforedestroy 升级后 onbeforeunmounted
destroyed升级后 onunmounted`
import {onUnmounted,onMounted } from'vue'
setup () {
...
onMounted(() => {console.log('onMounted')})
...}
此外之前的nexttick在vca中不适用this.$nexttick
而且。nexttick执行周期比onupdated还晚
```nexttick(()=>{
console.log("nexttick")
})