MCPcopy
hub / github.com/fanmingming/live / initMixin

Function initMixin

m3u8/vue.js:4953–5008  ·  view source on GitHub ↗
(Vue)

Source from the content-addressed store, hash-verified

4951 var uid$3 = 0;
4952
4953 function initMixin (Vue) {
4954 Vue.prototype._init = function (options) {
4955 var vm = this;
4956 // a uid
4957 vm._uid = uid$3++;
4958
4959 var startTag, endTag;
4960 /* istanbul ignore if */
4961 if (config.performance && mark) {
4962 startTag = "vue-perf-start:" + (vm._uid);
4963 endTag = "vue-perf-end:" + (vm._uid);
4964 mark(startTag);
4965 }
4966
4967 // a flag to avoid this being observed
4968 vm._isVue = true;
4969 // merge options
4970 if (options && options._isComponent) {
4971 // optimize internal component instantiation
4972 // since dynamic options merging is pretty slow, and none of the
4973 // internal component options needs special treatment.
4974 initInternalComponent(vm, options);
4975 } else {
4976 vm.$options = mergeOptions(
4977 resolveConstructorOptions(vm.constructor),
4978 options || {},
4979 vm
4980 );
4981 }
4982 /* istanbul ignore else */
4983 {
4984 initProxy(vm);
4985 }
4986 // expose real self
4987 vm._self = vm;
4988 initLifecycle(vm);
4989 initEvents(vm);
4990 initRender(vm);
4991 callHook(vm, 'beforeCreate');
4992 initInjections(vm); // resolve injections before data/props
4993 initState(vm);
4994 initProvide(vm); // resolve provide after data/props
4995 callHook(vm, 'created');
4996
4997 /* istanbul ignore if */
4998 if (config.performance && mark) {
4999 vm._name = formatComponentName(vm, false);
5000 mark(endTag);
5001 measure(("vue " + (vm._name) + " init"), startTag, endTag);
5002 }
5003
5004 if (vm.$options.el) {
5005 vm.$mount(vm.$options.el);
5006 }
5007 };
5008 }
5009
5010 function initInternalComponent (vm, options) {

Callers 1

vue.jsFile · 0.85

Calls 10

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

Tested by

no test coverage detected