| 5008 | } |
| 5009 | |
| 5010 | function initInternalComponent (vm, options) { |
| 5011 | var opts = vm.$options = Object.create(vm.constructor.options); |
| 5012 | // doing this because it's faster than dynamic enumeration. |
| 5013 | var parentVnode = options._parentVnode; |
| 5014 | opts.parent = options.parent; |
| 5015 | opts._parentVnode = parentVnode; |
| 5016 | |
| 5017 | var vnodeComponentOptions = parentVnode.componentOptions; |
| 5018 | opts.propsData = vnodeComponentOptions.propsData; |
| 5019 | opts._parentListeners = vnodeComponentOptions.listeners; |
| 5020 | opts._renderChildren = vnodeComponentOptions.children; |
| 5021 | opts._componentTag = vnodeComponentOptions.tag; |
| 5022 | |
| 5023 | if (options.render) { |
| 5024 | opts.render = options.render; |
| 5025 | opts.staticRenderFns = options.staticRenderFns; |
| 5026 | } |
| 5027 | } |
| 5028 | |
| 5029 | function resolveConstructorOptions (Ctor) { |
| 5030 | var options = Ctor.options; |