mirror of
https://github.com/vuejs/vue.git
synced 2024-11-21 20:28:54 +00:00
progress
This commit is contained in:
parent
7b8546378c
commit
314f25eaf3
@ -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)
|
||||
}
|
||||
|
13
src/runtime/instance/lifecycle.js
Normal file
13
src/runtime/instance/lifecycle.js
Normal file
@ -0,0 +1,13 @@
|
||||
export function initLifecycle (vm) {
|
||||
|
||||
}
|
||||
|
||||
export function lifecycleMixin (Vue) {
|
||||
Vue.prototype.$mount = function () {
|
||||
|
||||
}
|
||||
|
||||
Vue.prototype.$destroy = function () {
|
||||
|
||||
}
|
||||
}
|
@ -11,6 +11,7 @@ import {
|
||||
} from '../util/index'
|
||||
|
||||
export function initState (vm) {
|
||||
vm._watchers = []
|
||||
initData(vm)
|
||||
initComputed(vm)
|
||||
initMethods(vm)
|
||||
|
Loading…
Reference in New Issue
Block a user