这个函数啥意思?

export default class Watcher {  

    constructor (    

        vm: Component,    

        expOrFn: string | Function,    

        cb: Function,    

        options?: Object = {}  

    ) {   

       ...

       if (typeof expOrFn === 'function') {

         this.getter = expOrFn    

        } else {

         this.getter = parsePath(expOrFn)    

       }

       ...

       this.value = this.lazy ? undefined : this.get()  

     } 

}


蝴蝶刀刀
浏览 619回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript