This commit is contained in:
Evan You 2016-04-12 22:22:37 -04:00
parent 7b8546378c
commit 314f25eaf3
3 changed files with 22 additions and 1 deletions

View File

@ -1,15 +1,22 @@
import { initState, stateMixin } from './state'
import { initRender, renderMixin } from './render'
import { initEvents, eventsMixin } from './events'
import { initLifecycle, lifecycleMixin } from './lifecycle'
import { nextTick } from '../util/index'
export default function Vue (options) {
this.$options = options
this._watchers = []
initState(this)
initEvents(this)
initLifecycle(this)
initRender(this)
}
stateMixin(Vue)
eventsMixin(Vue)
lifecycleMixin(Vue)
renderMixin(Vue)
Vue.prototype.$nextTick = function (fn) {
nextTick(fn, this)
}

View File

@ -0,0 +1,13 @@
export function initLifecycle (vm) {
}
export function lifecycleMixin (Vue) {
Vue.prototype.$mount = function () {
}
Vue.prototype.$destroy = function () {
}
}

View File

@ -11,6 +11,7 @@ import {
} from '../util/index'
export function initState (vm) {
vm._watchers = []
initData(vm)
initComputed(vm)
initMethods(vm)