![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Vue源碼解讀
losedguest
这个作者很懒,什么都没留下…
展开
-
一次性搞清楚element-ui里用到this._l()是什麼意思
參考 https://segmentfault.com/q/1010000017896162/a-1020000017896676查看Vue.js的源碼,可以看到如下兩段代碼 function installRenderHelpers (target) { target._o = markOnce; target._n = toNumber; target._s = toString; target._l = renderList; target._t = re原创 2021-01-16 10:32:26 · 1475 阅读 · 0 评论 -
1.Vue的函數結構
Vue的函數結構//超級匿名函數(params)--自执行函数//params為一個參數執行的匿名函數 function(a,b){執行b並將b的返回值賦值給a.Vue屬性}(this,func)//func又是一個超級匿名函數(subParams)//subParams是一個參數匿名函數function(){聲明Vue,并返回Vue}//這一系列匿名函數完成了Window.Vue=s...原创 2019-08-27 12:00:13 · 133 阅读 · 0 评论 -
2.Vue.use到底是幹什麼的?
方法中的this為VueVue.use(rooter);即將rooter插件添加到Vue的插件組中_installedPluginsrooter滿足的條件是 rooter本身是一個函數,或者rooter的屬性install是個函數toArray(arguments, 1);的意思是將arguments里的最後一項(rooter)去掉Vue.use的源碼如下Vue.use =...原创 2019-08-27 16:13:11 · 146 阅读 · 0 评论