Match-id-30c3c11db166222cef6d0b38a690afdd4a0fbc80

This commit is contained in:
* 2022-01-25 11:49:16 +08:00 committed by *
parent a68c3b9897
commit b9a2d4067d
1 changed files with 6 additions and 3 deletions

View File

@ -43,7 +43,6 @@ import {
findDomParent, getSiblingDom,
} from '../vnode/VNodeUtils';
import { shouldAutoFocus } from '../../dom/utils/Common';
import { internalKeys } from '../../dom/DOMInternalKeys';
function callComponentWillUnmount(vNode: VNode, instance: any) {
try {
@ -311,8 +310,12 @@ function unmountDomComponents(vNode: VNode): void {
function submitClear(vNode: VNode): void {
const realNode = vNode.realNode;
const cloneDom = realNode.cloneNode(false); // 复制节点后horizon的两个属性消失
cloneDom[internalKeys.VNode] = realNode[internalKeys.VNode];
cloneDom[internalKeys.props] = realNode[internalKeys.props];
const customizeKeys = Object.keys;
const keyLength = customizeKeys.length;
for(let i = 0; i < keyLength; i++) {
const key = customizeKeys[i];
cloneDom[key] = realNode(key);
}
const parentObj = findDomParent(vNode);
const currentParent = parentObj.parentDom;