MCPcopy Index your code
hub / github.com/TruthHun/BookStack / initMixin

Function initMixin

static/vuejs/vue.runtime.esm.js:3708–3765  ·  view source on GitHub ↗
(Vue)

Source from the content-addressed store, hash-verified

3706var uid = 0;
3707
3708function initMixin (Vue) {
3709 Vue.prototype._init = function (options) {
3710 var vm = this;
3711 // a uid
3712 vm._uid = uid++;
3713
3714 var startTag, endTag;
3715 /* istanbul ignore if */
3716 if (process.env.NODE_ENV !== 'production' && config.performance && mark) {
3717 startTag = "vue-perf-init:" + (vm._uid);
3718 endTag = "vue-perf-end:" + (vm._uid);
3719 mark(startTag);
3720 }
3721
3722 // a flag to avoid this being observed
3723 vm._isVue = true;
3724 // merge options
3725 if (options && options._isComponent) {
3726 // optimize internal component instantiation
3727 // since dynamic options merging is pretty slow, and none of the
3728 // internal component options needs special treatment.
3729 initInternalComponent(vm, options);
3730 } else {
3731 vm.$options = mergeOptions(
3732 resolveConstructorOptions(vm.constructor),
3733 options || {},
3734 vm
3735 );
3736 }
3737 /* istanbul ignore else */
3738 if (process.env.NODE_ENV !== 'production') {
3739 initProxy(vm);
3740 } else {
3741 vm._renderProxy = vm;
3742 }
3743 // expose real self
3744 vm._self = vm;
3745 initLifecycle(vm);
3746 initEvents(vm);
3747 initRender(vm);
3748 callHook(vm, 'beforeCreate');
3749 initInjections(vm); // resolve injections before data/props
3750 initState(vm);
3751 initProvide(vm); // resolve provide after data/props
3752 callHook(vm, 'created');
3753
3754 /* istanbul ignore if */
3755 if (process.env.NODE_ENV !== 'production' && config.performance && mark) {
3756 vm._name = formatComponentName(vm, false);
3757 mark(endTag);
3758 measure(((vm._name) + " init"), startTag, endTag);
3759 }
3760
3761 if (vm.$options.el) {
3762 vm.$mount(vm.$options.el);
3763 }
3764 };
3765}

Callers 1

vue.runtime.esm.jsFile · 0.70

Calls 10

initInternalComponentFunction · 0.70
mergeOptionsFunction · 0.70
initLifecycleFunction · 0.70
initEventsFunction · 0.70
initRenderFunction · 0.70
callHookFunction · 0.70
initInjectionsFunction · 0.70
initStateFunction · 0.70
initProvideFunction · 0.70

Tested by

no test coverage detected