Posts
All the articles I've posted.
Vue update 过程
Published: at 08:00```js src/core/instance/lifecycle.js src/platforms/web/runtime/index.js src/platforms/web/runtime/patch.js
Virtual DOM 详解
Published: at 08:00直接操作DOM会影响性能,所以才产生了虚拟DOM。 一个对象,两个前提,三个步骤。 Virtual DOM是一个基本的JavaScript对象,也是整个Virtual DOM数的基本。
Vue render 函数
Published: at 08:00template ```js <div id="app"> {{ message }} </div> ``` render ```js render: function(createElement){
Vue 实例挂载的实现
Published: at 08:00Vue中我们是通过$mount实例方法去挂载vm的,$mount方法在多个文件中都有定义,如 ```js $mount src/platform/web/entry-runtime-with-compiler.js
new Vue 发生了什么
Published: at 08:00src/core/instance/index.js ```js function Vue (options) { if (process.env.NODE_ENV !== 'production' &&
Vue.js 数据驱动
Published: at 08:00Vue.js的核心思想是数据驱动。 视图是由数据驱动生成的,我们对视图的修改,不会直接操作DOM,而是通过修改数据。 - 简化代码量 - 利于维护 简洁的模板语法来声明式的将数据渲染为DOM:
Vue.js 从入口开始
Published: at 08:00``` src/platforms/web/entry-runtime-with-compiler.js src/platforms/web/runtime/index.js
Vue.js 源码构建
Published: at 08:00Vue.js源码是通过Rollup构建的,配置在build目录下。 使用Runtime only时,需要借助如webpack的vue-loader工具把.vue文件编译成JavaScript,因为这是在编译阶段做的,所以Runtime only只包含运行时的Vue.js代码,因此代码体积也更轻量。
Vue.js 源码目录设计
Published: at 08:00src下的源码 ```js src |-- compiler |-- core |-- platforms |-- server |-- sfc |-- shared
Vue.js 技术揭秘 - Flow
Published: at 08:00Flow是Facebook出品的JavaScript静态类型检查工具,Vue.js的源码利用了Flow做静态类型检查,当然新版的Vue.js中使用了TypeScript来做这个事情。