vue.js 源代码学习笔记 ----- $watcher】的更多相关文章

/* @flow */ import { queueWatcher } from './scheduler' import Dep, { pushTarget, popTarget } from './dep' import { warn, remove, isObject, parsePath, _Set as Set, handleError } from '../util/index' let uid = 0 /** * A watcher parses an expression, co…
一.为什么学习vue.js methods 只有纯粹的数据逻辑,而不是去处理 DOM 事件细节. vue.js兼具angular.js和react的优点,并且剔除了他们的缺点 官网:http://cn.vuejs.org/ 手册:http://cn.vuejs.org/v2/api/ 二.vue.js是什么 Vue是一个"MVVM框架(库)",和angular类似,相比angular小巧,比较容易上手 Vue是一个构建用户界面点的渐进式框架,与其他重量级框架不同的是,vue采用自底向上…
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title></title> <script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.js"></script> <script src="https://cdn.bootcss…
Vue.js学习笔记 目录 Vue.js学习笔记 ES6语法 1.不一样的变量声明:const和let 2.模板字符串 3.箭头函数(Arrow Functions) 4. 函数的参数默认值 5.Spread / Rest 操作符 6.二进制和八进制字面量 7.对象和数组解构 8.对象超类 9.for...of 和 for...in 10.ES6中的类 1.基本认识vue MVVM 模式 View 层 Model 层 ViewModel 层 Vue实例的options vue实例的生命周期 2.…
/** * Not type-checking this file because it's mostly vendor code. */ /*! * HTML Parser By John Resig (ejohn.org) * Modified by Juriy "kangax" Zaytsev * Original code by Erik Arvidsson, Mozilla Public License * http://erik.eae.net/simplehtmlpars…
/* @flow */ import Dep from '../observer/dep' import Watcher from '../observer/watcher' import { set, del, observe, observerState, defineReactive } from '../observer/index' import { warn, bind, noop, hasOwn, isReserved, handleError, validateProp, isP…
/* @flow */ import config from '../config' import Watcher from '../observer/watcher' import { mark, measure } from '../util/perf' import { createEmptyVNode } from '../vdom/vnode' import { observerState } from '../observer/index' import { updateCompon…
/* @flow */ // Object.freeze 使得这个对象不能增加属性, 修改属性, 这样就保证了这个对象在任何时候都是空的 export const emptyObject = Object.freeze({}) /** * Check if a string starts with $ or _ ascii unicode 的区别 charcodeAt是一个字符的 unicode编码, 但是像 0x24 (代表的是 $ ) 0x5f (代表的是 _ ) 因为是字符, 先存着asc…
/* @flow */ /* globals MutationObserver */ import { noop } from 'shared/util' // can we use __proto__? 有些浏览器不能让你明目张胆的使用 __proto__ export const hasProto = '__proto__' in {} // Browser environment sniffing 这里作者不太严谨, 直接用 navigator.userAget 判断浏览器 //利用 wi…
参考 vue 2.2.6版本 /* @flow */ //引入订阅者模式 import Dep from './dep' import { arrayMethods } from './array' import { def, isObject, isPlainObject, hasProto, hasOwn, warn, isServerRendering } from '../util/index' const arrayKeys = Object.getOwnPropertyNames(a…