Skip to content

文档补全 #30

@fengzi2016

Description

@fengzi2016

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions