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 (options) {
if (process.env.NODE_ENV !== 'production' &&
!(this instanceof Vue)) {
//提示需要 new 实例化
warn('Vue is a constructor and should be called with the `new` keyword')
}
this._init(options)
}

//扩展vue的原型方法
initMixin(Vue)
stateMixin(Vue)
eventsMixin(Vue)
lifecycleMixin(Vue)
renderMixin(Vue) export default Vue

vue.js 源代码学习笔记 ----- instance index的更多相关文章

  1. vue.js 源代码学习笔记 ----- instance render

    /* @flow */ import { warn, nextTick, toNumber, _toString, looseEqual, emptyObject, handleError, loos ...

  2. vue.js 源代码学习笔记 ----- instance state

    /* @flow */ import Dep from '../observer/dep' import Watcher from '../observer/watcher' import { set ...

  3. vue.js 源代码学习笔记 ----- instance event

    /* @flow */ import { updateListeners } from '../vdom/helpers/index' import { toArray, tip, hyphenate ...

  4. vue.js 源代码学习笔记 ----- instance proxy

    /* not type checking this file because flow doesn't play well with Proxy */ import config from 'core ...

  5. vue.js 源代码学习笔记 ----- instance init

    /* @flow */ import config from '../config' import { initProxy } from './proxy' import { initState } ...

  6. vue.js 源代码学习笔记 ----- instance inject

    /* @flow */ import { hasSymbol } from 'core/util/env' import { warn } from '../util/index' import { ...

  7. vue.js 源代码学习笔记 ----- 工具方法 option

    /* @flow */ import Vue from '../instance/index' import config from '../config' import { warn } from ...

  8. vue.js 源代码学习笔记 ----- html-parse.js

    /** * Not type-checking this file because it's mostly vendor code. */ /*! * HTML Parser By John Resi ...

  9. vue.js 源代码学习笔记 ----- core lifecycle

    /* @flow */ import config from '../config' import Watcher from '../observer/watcher' import { mark, ...

随机推荐

  1. vultr VPS安装BBR

    1.安装 wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh chmod +x bbr.s ...

  2. 【caffe】用训练好的imagenet模型分类图像

    因为毕设需要,我首先是用ffmpeg抽取某个宠物视频的关键帧,然后用caffe对这个关键帧中的物体进行分类. 1.抽取关键帧的命令: E:\graduation design\FFMPEG\bin&g ...

  3. GIT使用—提交的查找与变更

    一.查找提交 (1)git bisect(二分搜索法) 基于任意搜索条件查找特定的错误提交.在排查某个提交版本导致的错误时非常有用. [root@localhost public_html]# git ...

  4. 微信小程序页面跳转后js定时器没有销毁的问题

    现在有一个小程序,对页面数据的实时性很强,本来想用socket,仔细研究了一下,万剑不离其中,它是websocket.服务端不会用,所以使用了传统的http请求方式.开发微信小程序必须要知道的事 1. ...

  5. windows上面非常好用的辅助软件

    1.everything  快速查找本地文件 下载地址:http://www.voidtools.com/

  6. java第四周学习总结

    学号20145336 <Java程序设计>第4周学习总结 教材学习内容总结 继承 继承符合(Don't Repeat Yourself)原则,即在自己的代码中不要重复自己编写的信息,这在多 ...

  7. .Net HttpClient form-data格式请求

    var multipartFormDataContent = new MultipartFormDataContent(); multipartFormDataContent.Add(new Stri ...

  8. Django Nginx配置

    1.安装uwsgi.flup.djangowget http://www.saddi.com/software/flup/dist/flup-1.0.2.tar.gz 2.项目创建和配置2.1.创建项 ...

  9. [译]JavaScript需要类吗?

    [译]JavaScript需要类吗?   原文:http://www.nczonline.net/blog/2012/10/16/does-javascript-need-classes/ 译者注:在 ...

  10. 解决 libnanomsg.so.0: cannot open shared object file: No such file or directory 无法找到libnanomsg动态链接库

    参考: [11]缺少动态连接库.so--cannot open shared object file: No such file or directory Importing Issues: cann ...