Lifecycle hook = Life cycle function = Life cycle events
Main life cycle function classification ：
Life cycle functions during creation ：
beforeCreate： Instance just created in memory , here , Not initialized yet data and methods attribute
created： Instance created in memory OK, here data and methods Created OK, This is not the beginning Compiling templates
beforeMount： Now the template has been compiled , But it hasn't been attached to the page yet
mounted： here , Compiled template , Mounted in the container specified by the page
Life cycle functions during operation ：
beforeUpdate： Execute this function before status update , here data The status value in is up to date , But the interface shows The data is still old , Because re rendering has not started yet DOM node
updated： This function is called after the instance is updated. , here data Status value in and Data displayed on the interface , All of them have been updated , The interface has been re rendered ！
Life cycle function during destruction ：
beforeDestroy： Call before instance destruction . In this step , Instance is still fully available .
destroyed：Vue Call after instance destruction . After calling ,Vue Everything indicated by the instance is unbound , All event listeners will be removed , All child instances will also be destroyed .