diff --git a/17_生命周期/1.引出生命周期.html b/17_生命周期/1.引出生命周期.html index b31f040..4ed2553 100644 --- a/17_生命周期/1.引出生命周期.html +++ b/17_生命周期/1.引出生命周期.html @@ -17,16 +17,16 @@ const vm = new Vue({ el: '#root', data: { - isShowHello: true, + isShowHello: true, opacity: 1 }, // Vue完成模板解析,并把真实的DOM放入页面后调用mounted注意这里是方法函数,不是对象,刷新页面不会调用mounted mounted() { - console.log('mounted') - setInterval(()=>{ - this.opacity -= 0.01 - if (this.opacity <= 0) this.opacity = 1 - },16) + console.log('mounted') + setInterval(() => { + this.opacity -= 0.01 + if (this.opacity <= 0) this.opacity = 1 + }, 16) } }) // setInterval(()=>{ diff --git a/17_生命周期/2.分析生命周期.html b/17_生命周期/2.分析生命周期.html new file mode 100644 index 0000000..d329348 --- /dev/null +++ b/17_生命周期/2.分析生命周期.html @@ -0,0 +1,64 @@ + + +
+ +