Fork自 DCloud / uni-app
体验新版 GitCode,发现更多精彩内容 >>
import initVue from 'uni-core/vue' import { registerApp } from '../app' import { initData } from './data' import { initLifecycle } from './lifecycle' export default { install (Vue, options) { initVue(Vue) initData(Vue) initLifecycle(Vue) const oldMount = Vue.prototype.$mount Vue.prototype.$mount = function mount (el, hydrating) { if (this.mpType === 'app') { this.$options.render = function () {} registerApp(this) } return oldMount.call(this, el, hydrating) } } }