fix(版本对比): 对比算法补充

--user=郭雨琦
This commit is contained in:
guoyuqi 2022-03-29 14:44:38 +08:00 committed by 刘瑞斌
parent c172538a31
commit 534fa3c154
1 changed files with 5 additions and 1 deletions

View File

@ -233,13 +233,17 @@ function sameDetail(oldVnode,newVnode,sameNode){
}else{ }else{
sameNode.nodeArray = []; sameNode.nodeArray = [];
} }
}else if(oldVnode.tag==='textarea'&&newVnode.tag==='textarea'){ }
else if(oldVnode.tag==='textarea'&&newVnode.tag==='textarea'){
if(oldVnode.elm.value===newVnode.elm.value){ if(oldVnode.elm.value===newVnode.elm.value){
sameNode.nodeArray.push(newVnode.elm); sameNode.nodeArray.push(newVnode.elm);
}else { }else {
sameNode.nodeArray = []; sameNode.nodeArray = [];
} }
} }
else {
sameNode.nodeArray.push(newVnode.elm);
}
} }
else { else {
if(sameVnode(oldVnode,newVnode)){ if(sameVnode(oldVnode,newVnode)){