( key )
| 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; |
no test coverage detected