填写这份《一分钟调查》,帮我们(开发组)做得更好!去填写Home

KeyValueChanges

一个对象,描述自上次调用 KeyValueDiffer#diff() 以来的变化的 Map{[k:string]: string}

An object describing the changes in the Map or {[k:string]: string} since last time KeyValueDiffer#diff() was invoked.

      
      interface KeyValueChanges<K, V> {
  forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void
  forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void
  forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void
  forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void
  forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void
}
    

方法

遍历所有更改。KeyValueChangeRecord 将包含有关每个条目更改的信息。

Iterate over all changes. KeyValueChangeRecord will contain information about changes to each item.

      
      forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void
    
参数
fn (r: KeyValueChangeRecord) => void
返回值

void

按照原始映射表中的顺序遍历更改,以显示原始条目移动过的位置。

Iterate over changes in the order of original Map showing where the original items have moved.

      
      forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void
    
参数
fn (r: KeyValueChangeRecord) => void
返回值

void

遍历所有更改了值的键名。

Iterate over all keys for which values have changed.

      
      forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void
    
参数
fn (r: KeyValueChangeRecord) => void
返回值

void

遍历所有已添加的条目。

Iterate over all added items.

      
      forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void
    
参数
fn (r: KeyValueChangeRecord) => void
返回值

void

遍历所有已删除的条目。

Iterate over all removed items.

      
      forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void
    
参数
fn (r: KeyValueChangeRecord) => void
返回值

void