Skip to content

Commit 6cfe3fb

Browse files
authored
修正:beforeUnmount 而不是 beforeUnmounted
beforeUnmounted ❌ 错误 beforeUnmount ✅ 正确 官方文档:https://staging-cn.vuejs.org/api/options-lifecycle.html#beforeunmount
1 parent a292ca2 commit 6cfe3fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

public/19-lifecycle/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
| mounted | mounted | 组件挂载到实例上去之后 |
3131
| beforeUpdate | beforeUpdate | 组件数据发生变化,更新之前 |
3232
| updated | updated | 数据数据更新之后 |
33-
| beforeDestroy | **beforeUnmounted** | 组件实例销毁之前 |
33+
| beforeDestroy | **beforeUnmount** | 组件实例销毁之前 |
3434
| destroyed | **unmounted** | 组件实例销毁之后 |
3535
| activated | activated | keep-alive 缓存的组件激活时 |
3636
| deactivated | deactivated | keep-alive 缓存的组件停用时调用 |
@@ -57,7 +57,7 @@
5757

5858
**updated**:完成`view`层的更新,更新后,所有状态已是最新
5959

60-
**beforeunmounted**:实例被销毁前调用,可用于一些定时器或订阅的取消
60+
**beforeUnmount**:实例被销毁前调用,可用于一些定时器或订阅的取消
6161

6262
**unmounted**:销毁一个实例。可清理它与其它实例的连接,解绑它的全部指令及事件监听器
6363

@@ -78,4 +78,4 @@ https://github1s.com/vuejs/core/blob/HEAD/packages/runtime-core/src/componentOpt
7878

7979
vue2中声明周期的派发时刻:
8080

81-
https://github1s.com/vuejs/vue/blob/HEAD/src/core/instance/init.js#L55-L56
81+
https://github1s.com/vuejs/vue/blob/HEAD/src/core/instance/init.js#L55-L56

0 commit comments

Comments
 (0)