其他分享
首页 > 其他分享> > vue2 - 生命周期

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>

 

 

标签:updated,生命周期,console,log,created,beforeMount,vue2,beforeCreate
来源: https://www.cnblogs.com/leviAckman/p/16214839.html