Get the App
SLTechnology News&Howtos  ›  Development  › 

What is componentization in the Vue lifecycle?

Shulou Source: shulou.com Published: 2022-06-01 06:33:58 10月28日 Update

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)

Tags: Component cycle life function template article componentization instance local prompt event value element global interest again writing at the same time timer container Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Linux Shulou Tech Info Apple NVidia