nrz

Results 2 comments of nrz

感谢@aooy分享,很赞的文章~~ 不过这里有个小问题,这张图里的第4步应该没有移动的操作,只是移动了idx, c的位置是在第5步中a, b节点删除掉之后,自然地跟在了d的后面~ ![img](https://www.evernote.com/l/AaxO1ZpwdnNPPLQR5iJs_HFUdTpEqvODqtkB/image.png) 第四步逻辑大概就是newCh的newStartIdx, newEndIdx在c元素上发生了重叠,然后在下一次循环中进入了`else if(sameVnode(oldEndVnode, newEndVnode))`这个逻辑: ```js patchVnode(oldEndVnode, newEndVnode) oldEndVnode = oldCh[--oldEndIdx] newEndVnode = newCh[--newEndIdx] ``` 不知道我的理解对不~~

@panw3i 《移动web手册》 PPK写的