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

Function loop

static/vuejs/vue.runtime.js:2682–2711  ·  view source on GitHub ↗
( key )

Source from the content-addressed store, hash-verified

2680 // root instance props should be converted
2681 observerState.shouldConvert = isRoot;
2682 var loop = function ( key ) {
2683 keys.push(key);
2684 var value = validateProp(key, propsOptions, propsData, vm);
2685 /* istanbul ignore else */
2686 {
2687 if (isReservedProp[key]) {
2688 warn(
2689 ("\"" + key + "\" is a reserved attribute and cannot be used as component prop."),
2690 vm
2691 );
2692 }
2693 defineReactive$$1(props, key, value, function () {
2694 if (vm.$parent && !observerState.isSettingProps) {
2695 warn(
2696 "Avoid mutating a prop directly since the value will be " +
2697 "overwritten whenever the parent component re-renders. " +
2698 "Instead, use a data or computed property based on the prop's " +
2699 "value. Prop being mutated: \"" + key + "\"",
2700 vm
2701 );
2702 }
2703 });
2704 }
2705 // static props are already proxied on the component's prototype
2706 // during Vue.extend(). We only need to proxy props defined at
2707 // instantiation here.
2708 if (!(key in vm)) {
2709 proxy(vm, "_props", key);
2710 }
2711 };
2712
2713 for (var key in propsOptions) loop( key );
2714 observerState.shouldConvert = true;

Callers 2

initPropsFunction · 0.70
initInjectionsFunction · 0.70

Calls 4

validatePropFunction · 0.70
defineReactive$$1Function · 0.70
proxyFunction · 0.70
warnFunction · 0.50

Tested by

no test coverage detected