vue2 - 生命周期

<script>
  new Vue({
    beforeCreate() {
      console.log('beforeCreate')
    },
    created() {
      console.log('created')
    },
    beforeMount() {
      console.log('beforeMount')
    },
    mounted() {
      console.log('mounted 常用')
    },
    beforeUpdate() {
      console.log('beforeUpdate')
    },
    updated() {
      console.log('updated')
    },
    beforeDestroy() {
      console.log('beforeDestroy')
    },
    destroyed() {
      console.log('destroyed 常用')
    },
  })
</script>

 

 

posted on 2022-05-02 00:06  每天积极向上  阅读(16)  评论(0编辑  收藏  举报

导航