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

DefaultIterableDiffer

已弃用: v4.0.0 - Should not be part of public API.

v4.0.0-不应成为公共 API 的一部分。

      
      class DefaultIterableDiffer<V> implements IterableDiffer, IterableChanges {
  constructor(trackByFn?: TrackByFunction<V>)
  length: number
  collection: V[] | Iterable<V> | null
  isDirty: boolean
  forEachItem(fn: (record: IterableChangeRecord_<V>) => void)
  forEachOperation(fn: (item: IterableChangeRecord<V>, previousIndex: number, currentIndex: number) => void)
  forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void)
  forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void)
  forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void)
  forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void)
  forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void)
  diff(collection: NgIterable<V>): DefaultIterableDiffer<V> | null
  onDestroy()
  check(collection: NgIterable<V>): boolean
}
    

构造函数

      
      constructor(trackByFn?: TrackByFunction<V>)
    
参数
trackByFn TrackByFunction
可选. 默认值是 `undefined`.

属性

属性说明
length: number只读
collection: V[] | Iterable<V> | null只读
isDirty: boolean只读

方法

      
      forEachItem(fn: (record: IterableChangeRecord_<V>) => void)
    
参数
fn (record: IterableChangeRecord_) => void
      
      forEachOperation(fn: (item: IterableChangeRecord<V>, previousIndex: number, currentIndex: number) => void)
    
参数
fn (item: IterableChangeRecord, previousIndex: number, currentIndex: number) => void
      
      forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void)
    
参数
fn (record: IterableChangeRecord_) => void
      
      forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void)
    
参数
fn (record: IterableChangeRecord_) => void
      
      forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void)
    
参数
fn (record: IterableChangeRecord_) => void
      
      forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void)
    
参数
fn (record: IterableChangeRecord_) => void
      
      forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void)
    
参数
fn (record: IterableChangeRecord_) => void
      
      diff(collection: NgIterable<V>): DefaultIterableDiffer<V> | null
    
参数
collection NgIterable
返回值

DefaultIterableDiffer<V> | null

      
      onDestroy()
    
参数

没有参数。

      
      check(collection: NgIterable<V>): boolean
    
参数
collection NgIterable
返回值

boolean