文档补全
fengzi2016 opened this issue · 0 comments
fengzi2016 commented
如图:
在patch 的时候会自底向上(深度优先遍历)实现每个节点applyPatches
但是在diff的时候是自顶向下搜集每个节点的变更:
假设有节点1的变更是这样
那patches应该会记录成 {0: reorder, 1: replace, 2: replace}?
但是从代码的输出来看:
newChildren = diffs.children 会让根据key变换位置的children去和oldChildren比较,但是在https://www.npmjs.com/package/list-diff2中 对children没有过多介绍,可能会让人有迷惑