MCPcopy Create free account
hub / github.com/TruthHun/BookStack / initMixin

Function initMixin

static/vuejs/vue.runtime.js:3706–3761  ·  view source on GitHub ↗
(Vue)

Source from the content-addressed store, hash-verified

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

Callers 1

vue.runtime.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