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

Function loop

static/vuejs/vue.js:2686–2715  ·  view source on GitHub ↗
( key )

Source from the content-addressed store, hash-verified

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