SOURCE

console 命令行工具 X clear

                    
>
console
new Vue({
  el:'#app',
  data:{title:'The VueJS Instance'},
  beforeCreate:function(){
    console.log('beforeCreate');
  },
  created:function(){
    console.log('created');
  },
  beforeMount:function(){
    console.log('beforeMount');
  },
  mounted:function(){
    console.log('mounted');
  },
  beforeUpdate:function(){
    console.log('beforeUpdate');
  },
  updated:function(){
    console.log('updated');
  },
  beforeDestroy:function(){
    console.log('beforeDestroy');
  },
  destroyed:function(){
    console.log('destroyed');
  },
  methods:{
    destroy:function(){
      this.$destroy();
    }
  }
  
});
<script src="https://unpkg.com/vue@2.6.11/dist/vue.js">
</script>
<div id="app">
  <h1>{{title}}</h1>
  <button @click="title='Changed'">Change Title</button>
  <button @click="destroy">Destroy</button>
</div>