|
@ -3777,8 +3777,8 @@ function renderStatic ( |
|
|
) { |
|
|
) { |
|
|
// static trees can be rendered once and cached on the contructor options
|
|
|
// static trees can be rendered once and cached on the contructor options
|
|
|
// so every instance shares the same cached trees
|
|
|
// so every instance shares the same cached trees
|
|
|
var renderFns = this.$options.staticRenderFns; |
|
|
var options = this.$options; |
|
|
var cached = renderFns.cached || (renderFns.cached = []); |
|
|
var cached = options.cached || (options.cached = []); |
|
|
var tree = cached[index]; |
|
|
var tree = cached[index]; |
|
|
// if has already-rendered static tree and not inside v-for,
|
|
|
// if has already-rendered static tree and not inside v-for,
|
|
|
// we can reuse the same tree by doing a shallow clone.
|
|
|
// we can reuse the same tree by doing a shallow clone.
|
|
@ -3788,7 +3788,7 @@ function renderStatic ( |
|
|
: cloneVNode(tree) |
|
|
: cloneVNode(tree) |
|
|
} |
|
|
} |
|
|
// otherwise, render a fresh tree.
|
|
|
// otherwise, render a fresh tree.
|
|
|
tree = cached[index] = renderFns[index].call(this._renderProxy, null, this); |
|
|
tree = cached[index] = options.staticRenderFns[index].call(this._renderProxy, null, this); |
|
|
markStatic(tree, ("__static__" + index), false); |
|
|
markStatic(tree, ("__static__" + index), false); |
|
|
return tree |
|
|
return tree |
|
|
} |
|
|
} |
|
|