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

 

相关文章:

  • 2021-11-28
  • 2021-07-21
  • 2022-02-08
  • 2022-03-08
  • 2021-10-10
  • 2021-11-06
  • 2022-01-14
  • 2021-06-19
猜你喜欢
  • 2021-12-05
  • 2022-01-03
  • 2021-10-26
  • 2021-07-01
  • 2021-07-19
  • 2022-02-02
  • 2021-09-12
相关资源
相似解决方案