forked from wuyawei/fe-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wuyw
committed
Apr 3, 2019
1 parent
aaeb7f6
commit 6ef39f4
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## 前言 | ||
作为 Vue 面试中的必考题之一,Vue 的响应式原理,想必用过 Vue 的同学都不会陌生,[Vue 官方文档](https://cn.vuejs.org/v2/guide/reactivity.html) 对响应式要注意的问题也都做了详细的说明。 | ||
|
||
但是对于刚接触或者了解不多的同学来说,可能还会感到困惑:为什么不能检测到对象属性的添加或删除?为什么不允许在已经创建的实例上动态添加新的根级响应式属性?为什么不支持通过索引设置数组成员?相信看完本期文章,你一定会豁然开朗。 | ||
|
||
本期重点将结合响应式的发布订阅模式,实现一个简易的 MVVM 框架。 | ||
|
||
**文章仓库 [🍹🍰 fe-code](https://github.com/wuyawei/fe-code),欢迎 star**。 | ||
|
||
Vue 官方的响应式原理图镇楼。 | ||
|
||
![](https://user-gold-cdn.xitu.io/2019/4/2/169deafe6c899320?w=1200&h=750&f=png&s=21308) | ||
## 思考 | ||
进入主题之前,我们先思考一个例子。 | ||
## Object.defineProperty 和 Proxy | ||
## MVVM | ||
### 概念 |