Match-id-9914aef941bed130e5727dba91ebbb4667de2798
This commit is contained in:
parent
b14bf9f4c0
commit
8f7e8e63e1
|
@ -70,7 +70,7 @@ function callMapFun(children: any, arr: Array<any>, prefix: string, callback: Fu
|
|||
mappedChild.ref,
|
||||
mappedChild.belongClassVNode,
|
||||
mappedChild.props,
|
||||
mappedChild.source,
|
||||
mappedChild._source
|
||||
);
|
||||
}
|
||||
arr.push(mappedChild);
|
||||
|
|
|
@ -13,7 +13,7 @@ export function JSXElement(type, key, ref, vNode, props, source: Source | null)
|
|||
return {
|
||||
// 元素标识符
|
||||
vtype: TYPE_COMMON_ELEMENT,
|
||||
source: isDev ? source : null,
|
||||
_source: isDev ? source : null,
|
||||
|
||||
// 属于元素的内置属性
|
||||
type: type,
|
||||
|
|
|
@ -12,7 +12,7 @@ export type UseContextHookType = { useContext<T>(context: ContextType<T>): T };
|
|||
|
||||
export type JSXElement = {
|
||||
vtype: any;
|
||||
source: any;
|
||||
_source: any;
|
||||
type: any;
|
||||
key: any;
|
||||
ref: any;
|
||||
|
|
|
@ -185,12 +185,12 @@ export function createVNode(tag: VNodeTag | string, ...secondArg) {
|
|||
}
|
||||
|
||||
export function createVNodeFromElement(element: JSXElement): VNode {
|
||||
const { type, key, props, source } = element;
|
||||
const { type, key, props, _source } = element;
|
||||
|
||||
if (type === TYPE_STRICT_MODE || type === TYPE_FRAGMENT || type === TYPE_PROFILER) {
|
||||
return createFragmentVNode(key, props.children);
|
||||
} else {
|
||||
return createUndeterminedVNode(type, key, props, source);
|
||||
return createUndeterminedVNode(type, key, props, _source);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue