dist/main.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) {
    {
      checkComponents(child);
    }
    if (typeof child === 'function') {
      child = child.options;
    }
    normalizeProps(child, vm);
    normalizeInject(child, vm);
    normalizeDirectives(child);
    if (!child._base) {
      if (child.extends) {
        parent = mergeOptions(parent, child.extends, 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 ) { { checkComponents ( child ) ; } if ( typeof child === 'function' ) { child = child . options ; } normalizeProps ( child , vm ) ; normalizeInject ( child , vm ) ; normalizeDirectives ( child ) ; if ( ! child . _base ) { if ( child . extends ) { parent = mergeOptions ( parent , child . extends , 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 .
// Apply extends and mixins on the child options, // but only if it is a raw options object that isn't // the result of another mergeOptions call. // Only merged options has the _base property.