瀏覽代碼

refactor: remove no longer needed _staticTrees property

Evan You 8 年之前
父節點
當前提交
bb1d888d44
共有 2 個文件被更改,包括 1 次插入10 次删除
  1. 0 1
      flow/component.js
  2. 1 9
      src/core/instance/render.js

+ 0 - 1
flow/component.js

@@ -66,7 +66,6 @@ declare interface Component {
   _isDestroyed: boolean;
   _isBeingDestroyed: boolean;
   _vnode: ?VNode; // self root node
-  _staticTrees: ?Array<VNode>;
   _hasHookEvent: boolean;
   _provided: ?Object;
 

+ 1 - 9
src/core/instance/render.js

@@ -17,7 +17,6 @@ import { isUpdatingChildComponent } from './lifecycle'
 
 export function initRender (vm: Component) {
   vm._vnode = null // the root of the child tree
-  vm._staticTrees = null
   const parentVnode = vm.$vnode = vm.$options._parentVnode // the placeholder node in parent tree
   const renderContext = parentVnode && parentVnode.context
   vm.$slots = resolveSlots(vm.$options._renderChildren, renderContext)
@@ -59,11 +58,7 @@ export function renderMixin (Vue: Class<Component>) {
 
   Vue.prototype._render = function (): VNode {
     const vm: Component = this
-    const {
-      render,
-      staticRenderFns,
-      _parentVnode
-    } = vm.$options
+    const { render, _parentVnode } = vm.$options
 
     if (vm._isMounted) {
       // if the parent didn't update, the slot nodes will be the ones from
@@ -78,9 +73,6 @@ export function renderMixin (Vue: Class<Component>) {
 
     vm.$scopedSlots = (_parentVnode && _parentVnode.data.scopedSlots) || emptyObject
 
-    if (staticRenderFns && !vm._staticTrees) {
-      vm._staticTrees = []
-    }
     // set parent vnode. this allows render functions to have access
     // to the data on the placeholder node.
     vm.$vnode = _parentVnode