What is componentization in the Vue lifecycle?
This article mainly introduces what the componentization in the Vue life cycle is, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.
Lead to the life cycle
At this point, change is called, the timer is called back to modify opacity, the data is modified, the template is re-parsed, and change is called again.
Destroy proc
Unbind (custom) event listener
Life cycle
Life cycle summary
Hello, {{name}} click stop opacity 1 Vue.config.productionTip = false New Vue ({el: "# root", data: {name: "atguigu", opacity: 1,}, methods: {stop () {this.$destroy () }}, beforeDestroy () {clearInterval (this.timer);}, / / vue completes the template parsing and puts the original real dom element on the page (after loading), this function will be called. Mounted () {this.timer = setInterval (() = > {this.opacity-= 0.01; if (this.opacity)