Match-id-b5f917c72588dc46381019cba0455e0369de6e5b
This commit is contained in:
parent
832a5b51c2
commit
74c1452b07
|
@ -30,11 +30,19 @@ let ctxOldChange: Boolean = false;
|
|||
let ctxOldPreviousContext: Object = {};
|
||||
|
||||
function setContext(vNode: VNode, contextName, value) {
|
||||
if (vNode.contexts === null) {
|
||||
vNode.contexts = {
|
||||
[contextName]: value,
|
||||
};
|
||||
} else {
|
||||
vNode.contexts[contextName] = value;
|
||||
}
|
||||
}
|
||||
function getContext(vNode: VNode, contextName) {
|
||||
if (vNode.contexts !== null) {
|
||||
return vNode.contexts[contextName];
|
||||
}
|
||||
}
|
||||
|
||||
// capture阶段设置
|
||||
function setNamespaceCtx(vNode: VNode, dom?: Container) {
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
import { FlagUtils } from '../vnode/VNodeFlags';
|
||||
import { createVNodeChildren, markRef } from './BaseComponent';
|
||||
import { DomComponent, DomPortal, DomText } from '../vnode/VNodeTags';
|
||||
import {getFirstChild, travelVNodeTree} from '../vnode/VNodeUtils';
|
||||
import { travelVNodeTree } from '../vnode/VNodeUtils';
|
||||
|
||||
function updateDom(
|
||||
processing: VNode,
|
||||
|
|
|
@ -42,7 +42,7 @@ export class VNode {
|
|||
task: any;
|
||||
|
||||
// 使用这个变量来记录修改前的值,用于恢复。
|
||||
contexts = {};
|
||||
contexts: any = null;
|
||||
// 因为LazyComponent会修改tag和type属性,为了能识别,增加一个属性
|
||||
isLazyComponent: boolean = false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue