Browse Source

Updated files

master
adiao 3 years ago
parent
commit
633f94c67e
  1. 10
      vue生命周期笔记.md

10
vue生命周期笔记.md

@ -64,7 +64,6 @@ vue初始化做了什么?
--> 销毁完毕,调用destroyed:销毁之后,所有的事件监听器会被移除,所有的子实例也都会被销毁 --> 销毁完毕,调用destroyed:销毁之后,所有的事件监听器会被移除,所有的子实例也都会被销毁
子组件的生命周期 子组件的生命周期
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
@ -151,7 +150,7 @@ vue初始化做了什么?
父 --> created 父 --> created
父 --> beforemount 父 --> beforemount
子 --> beforeCreate 子 --> beforeCreate
子 --> created 子 --> created
@ -159,9 +158,9 @@ vue初始化做了什么?
子 --> beforeMount 子 --> beforeMount
子 --> mounted 子 --> mounted
父 --> mounted 父 --> mounted
复制代码 复制代码
有v-if控制子组件的显示和隐藏。 有v-if控制子组件的显示和隐藏。
@ -180,7 +179,7 @@ v-if初始值为false,在父组件的(mounted)生命周期将变为true时,顺
父 --> mounted 父 --> mounted
父 --> beforeUpdate 父 --> beforeUpdate
子 --> beforeCreate 子 --> beforeCreate
子 --> created 子 --> created
@ -222,6 +221,7 @@ v-show初始值为false,在父组件的(mounted)生命周期将变为true时,
复制代码 复制代码
孙组件的生命周期 孙组件的生命周期
```html ```html
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">

Loading…
Cancel
Save