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