vue2/src/core/instance/index.ts

23 lines
555 B
TypeScript
Raw Normal View History

2021-04-03 22:06:56 +08:00
//@ts-nocheck
2016-05-17 21:58:24 +08:00
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'
2021-04-03 22:06:56 +08:00
function Vue(options) {
if (process.env.NODE_ENV !== 'production' && !(this instanceof Vue)) {
warn('Vue is a constructor and should be called with the `new` keyword')
}
2016-05-17 21:58:24 +08:00
this._init(options)
2016-04-14 17:21:48 +08:00
}
2016-05-17 21:58:24 +08:00
initMixin(Vue)
2016-04-13 09:41:12 +08:00
stateMixin(Vue)
eventsMixin(Vue)
2016-04-13 10:22:37 +08:00
lifecycleMixin(Vue)
2016-04-13 09:41:12 +08:00
renderMixin(Vue)
export default Vue