DMQ / mvvm

剖析vue实现原理,自己动手实现mvvm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

您好,我想问下关于watcher的问题

Sercl opened this issue · comments

commented

在Watcher函数中有一个判断
if (typeof expOrFn === 'function') { this.getter = expOrFn } else { this.getter = this.parseGetter(expOrFn) }
我看示例里并没有为function的类型啊,什么情况下这里会触发function的逻辑呢?非常感谢

commented

computed属性用到function