MockAnimationPlayer
class MockAnimationPlayer extends NoopAnimationPlayer {
constructor(element: any, keyframes: { [key: string]: string | number; }[], duration: number, delay: number, easing: string, previousPlayers: any[])
previousStyles: {...}
currentSnapshot: ɵStyleData
element: any
keyframes: {...}
duration: number
delay: number
easing: string
previousPlayers: any[]
onInit(fn: () => any)
init()
finish(): void
destroy(): void
triggerMicrotask()
play(): void
hasStarted()
beforeDestroy()
// 继承自 animations/NoopAnimationPlayer
constructor(duration: number = 0, delay: number = 0)
parentPlayer: AnimationPlayer | null
totalTime: number
onStart(fn: () => void): void
onDone(fn: () => void): void
onDestroy(fn: () => void): void
hasStarted(): boolean
init(): void
play(): void
pause(): void
restart(): void
finish(): void
destroy(): void
reset(): void
setPosition(position: number): void
getPosition(): number
}
构造函数
参数
|
属性
属性 | 说明 |
---|---|
previousStyles: { [key: string]: string | number; } | |
currentSnapshot: ɵStyleData | |
element: any | Declared in constructor. |
keyframes: { [key: string]: string | number; }[] | Declared in constructor. |
duration: number | Declared in constructor. |
delay: number | Declared in constructor. |
easing: string | Declared in constructor. |
previousPlayers: any[] | Declared in constructor. |
方法
参数没有参数。 |
参数没有参数。 返回值
|
参数没有参数。 返回值
|
参数没有参数。 |
参数没有参数。 返回值
|
参数没有参数。 |