Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/依赖收集.MarkDown
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ function remove (arr, item) {
const index = arr.indexOf(item)
if (index > -1) {
return arr.splice(index, 1)
}
}
}
```
Expand All @@ -70,11 +71,11 @@ class Watcher {
Dep.target = this;
/*Github:https://github.com/answershuto*/
/*触发渲染操作进行依赖收集*/
this.cb.call(this.vm);
this.cb && this.cb.call(this.vm);
}

update () {
this.cb.call(this.vm);
this.cb && this.cb.call(this.vm);
}
}
```
Expand Down