Simplified-Vue try to implement a very simplified vue, with basic two-way binding.
-
directives:
v-model
v-bind:
and it's shorthand:
-
template:
{{ whatever }}
-
computed
Open index.html
.
Try typing codes below in the console and observe the changes in DOM:
app.age = 10;
app.description = "A cute girl";
app.bestFriend.link = "https://www.baidu.com"
Try changing the value of <input>
and log the app.description
console.log(app.description);
- 使用 Proxy 进行数据劫持
- 编译模板
- 发布-订阅模式实现数据到视图的绑定
- computed
- methods