Browse Source

refactor: remove no longer needed _staticTrees property

dev
Evan You 7 years ago
parent
commit
bb1d888d44
  1. 1
      flow/component.js
  2. 10
      src/core/instance/render.js

1
flow/component.js

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

10
src/core/instance/render.js

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

Loading…
Cancel
Save