/* @flow */ import { updateListeners } from '../vdom/helpers/index' import { toArray, tip, hyphenate, formatComponentName } from '../util/index' export function initEvents (vm: Component) { vm._events = Object.create(null) vm._hasHookEvent = false //…
/* @flow */ import { warn, nextTick, toNumber, _toString, looseEqual, emptyObject, handleError, looseIndexOf } from '../util/index' import VNode, { cloneVNodes, createTextVNode, createEmptyVNode } from '../vdom/vnode' import { createElement } from '.…
/* @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…
/* not type checking this file because flow doesn't play well with Proxy */ import config from 'core/config' import { warn, makeMap } from '../util/index' let initProxy if (process.env.NODE_ENV !== 'production') { //一些能使用的全局变量 const allowedGlobals =…
/* @flow */ import config from '../config' import { initProxy } from './proxy' import { initState } from './state' import { initRender } from './render' import { initEvents } from './events' import { mark, measure } from '../util/perf' import { initL…
import { initMixin } from './init' import { stateMixin } from './state' import { renderMixin } from './render' import { eventsMixin } from './events' import { lifecycleMixin } from './lifecycle' import { warn } from '../util/index' function Vue (opti…
/* @flow */ import { hasSymbol } from 'core/util/env' import { warn } from '../util/index' import { defineReactive } from '../observer/index' export function initProvide (vm: Component) { const provide = vm.$options.provide if (provide) { // 计算proved…
/* @flow */ /* globals MutationObserver */ import { noop } from 'shared/util' // can we use __proto__? 有些浏览器不能让你明目张胆的使用 __proto__ export const hasProto = '__proto__' in {} // Browser environment sniffing 这里作者不太严谨, 直接用 navigator.userAget 判断浏览器 //利用 wi…
/* @flow */ import { parseFilters } from './parser/filter-parser' export function baseWarn (msg: string) { console.error(`[Vue parser]: ${msg}`) } export function pluckModuleFunction ( modules: ?Array<Object>, key: string ): Array<Function> {…
/** * 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…