生命周期

beforecreate:实例初始化,获取不到数据

credted:能获取到数据

beforemount:获取不到dom元素

mounted:能获取到dom元素

beforeupdated:数据更新之前

updated:数据更新后

beofredestory:实例销毁之前

destoryed:实例销毁之后

在销毁之后清除定时器的方法。

原文地址:https://www.cnblogs.com/hy96/p/12295251.html