vue 的生命周期实例

1、在test.vue文件内写好dom结构; 2、在script标签内写好beforeCreate(创建前),created(创建后),beforeMount(载入前),mounted(载入后),beforeUpdate(更新前),updated(更新后),beforeDestroy(销毁前),destroyed(销毁后); 3、在methods里写好change方法。 4、刷新页面,执行结果如下
相关文章
相关标签/搜索