mirror of
https://gitee.com/vuejs/vue.git
synced 2024-12-04 21:17:55 +08:00
remove unnecessary code
This commit is contained in:
parent
b02b1e5ba4
commit
026198caf1
@ -35,20 +35,6 @@ export function initRender (vm: Component) {
|
|||||||
) {
|
) {
|
||||||
return this._h(this._e(tag, data, namespace), children)
|
return this._h(this._e(tag, data, namespace), children)
|
||||||
}, vm)
|
}, vm)
|
||||||
// for abstract components, determine first non-abstract parent
|
|
||||||
// so that the children of abstract components are considered children
|
|
||||||
// of the first non-abstract parent.
|
|
||||||
// this is used by internal abstract components like <keep-alive>.
|
|
||||||
if (vm.$options._abstract) {
|
|
||||||
let parent = vm.$parent
|
|
||||||
/* istanbul ignore next */
|
|
||||||
while (parent && parent.$options._abstract) {
|
|
||||||
parent = parent.$parent
|
|
||||||
}
|
|
||||||
vm._renderParent = parent
|
|
||||||
} else {
|
|
||||||
vm._renderParent = vm
|
|
||||||
}
|
|
||||||
if (vm.$options.el) {
|
if (vm.$options.el) {
|
||||||
vm.$mount(vm.$options.el)
|
vm.$mount(vm.$options.el)
|
||||||
}
|
}
|
||||||
@ -62,7 +48,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 prev = renderState.activeInstance
|
const prev = renderState.activeInstance
|
||||||
renderState.activeInstance = vm._renderParent
|
renderState.activeInstance = vm
|
||||||
if (!vm._isMounted) {
|
if (!vm._isMounted) {
|
||||||
// render static sub-trees for once on initial render
|
// render static sub-trees for once on initial render
|
||||||
renderStaticTrees(vm)
|
renderStaticTrees(vm)
|
||||||
|
Loading…
Reference in New Issue
Block a user