From 3961b3340b908504d7e64cd16a628b5e7dae9b30 Mon Sep 17 00:00:00 2001 From: roger_home_pc Date: Sun, 8 Jan 2023 22:49:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E5=91=BD=E5=91=A8=E6=9C=9F2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 17_生命周期/1.引出生命周期.html | 12 ++--- 17_生命周期/2.分析生命周期.html | 64 +++++++++++++++++++++++ 2 files changed, 70 insertions(+), 6 deletions(-) create mode 100644 17_生命周期/2.分析生命周期.html 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 @@ + + + + + 分析生命周期 + + + +
+

当前的n值是:{{n}}

+ +
+ + + + \ No newline at end of file