demo/bundle.js
/**
             * Merge two option objects into a new one.
             * Core utility used in both instantiation and inheritance.
             */
Merge two option objects into a new one.
Core utility used in both instantiation and inheritance.
Merge two option objects into a new one . Core utility used in both instantiation and inheritance .
function mergeOptions (
              parent,
              child,
              vm
            ) {
              if (process.env.NODE_ENV !== 'production') {
                checkComponents(child);
              }
              if (typeof child === 'function') {
                child = child.options;
              }
              normalizeProps(child, vm);
              normalizeInject(child, vm);
              normalizeDirectives(child);
              var extendsFrom = child.extends;
              if (extendsFrom) {
                parent = mergeOptions(parent, extendsFrom, vm);
              }
              if (child.mixins) {
                for (var i = 0, l = child.mixins.length; i < l; i++) {
                  parent = mergeOptions(parent, child.mixins[i], vm);
                }
              }
              var options = {};
              var key;
              for (key in parent) {
                mergeField(key);
              }
              for (key in child) {
                if (!hasOwn(parent, key)) {
                  mergeField(key);
                }
              }
              function mergeField (key) {
                var strat = strats[key] || defaultStrat;
                options[key] = strat(parent[key], child[key], vm, key);
              }
              return options
            }
function mergeOptions ( parent , child , vm ) { if ( process . env . NODE_ENV !== 'production' ) { checkComponents ( child ) ; } if ( typeof child === 'function' ) { child = child . options ; } normalizeProps ( child , vm ) ; normalizeInject ( child , vm ) ; normalizeDirectives ( child ) ; var extendsFrom = child . extends ; if ( extendsFrom ) { parent = mergeOptions ( parent , extendsFrom , vm ) ; } if ( child . mixins ) { for ( var i = 0 , l = child . mixins . length ; i < l ; i ++ ) { parent = mergeOptions ( parent , child . mixins [ i ] , vm ) ; } } var options = { } ; var key ; for ( key in parent ) { mergeField ( key ) ; } for ( key in child ) { if ( ! hasOwn ( parent , key ) ) { mergeField ( key ) ; } } function mergeField ( key ) { var strat = strats [ key ] || defaultStrat ; options [ key ] = strat ( parent [ key ] , child [ key ] , vm , key ) ; } return options }
Merge two option objects into a new one.
Merge two option objects into a new one .