11 2020 档案

 
Vue之watch一个computed变量时,computed所依赖的变量值被改变会怎样?
摘要:vm.init,先为computed变量(假设是age,并在computed方法中依赖于另一个变量vm.factor)初始化,age会关联一个watcher(假设为cWatcher,lazy为true),vm.age的get方法被重写,cWatcher的dirty属性被置为true。其getter属 阅读全文
posted @ 2020-11-15 16:36 chuliang 阅读(1671) 评论(0) 推荐(0)
Vue整体设计思路(未完工)
摘要:全局组件通过Vue.component注册,而Vue.component的定义是在initGlobalAPI(Vue); >initAssetRegisters(Vue)。ASSET_TYPES数组中有'component'字符串。Vue.component(id, definition)方法的逻辑 阅读全文
posted @ 2020-11-02 00:24 chuliang 阅读(257) 评论(0) 推荐(0)