ng-cw-v12
Version:
Angular UI Component Library
41 lines (40 loc) • 1.63 kB
TypeScript
import { OnDestroy, ElementRef, SimpleChanges, OnChanges } from '@angular/core';
import * as i0 from "@angular/core";
export declare class NumberTickerComponent implements OnChanges, OnDestroy {
private elementRef;
/** 要显示的数字 */
ncValue: number;
/** 起始数值 */
ncStartValue: number;
/** 开始前的延迟 */
ncDelay: number;
/** 小数位数 */
ncDecimalPlaces: number;
/** 动画持续时间(毫秒) */
ncDuration: number;
/** 是否在视图可见时才开始动画 */
private _startOnView;
set ncStartOnView(val: boolean | string);
get ncStartOnView(): boolean;
/** 是否只执行一次动画 */
private _once;
set ncOnce(val: boolean | string);
get ncOnce(): boolean;
private observer;
private animationFrame;
private timeout;
currentValue: number;
displayValue: string;
constructor(elementRef: ElementRef);
ngOnChanges(changes: SimpleChanges): void;
ngOnDestroy(): void;
private start;
private clear;
private setupIntersectionObserver;
private startAnimation;
private resetAnimation;
private animate;
private updateDisplayValue;
static ɵfac: i0.ɵɵFactoryDeclaration<NumberTickerComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NumberTickerComponent, "nc-number-ticker", never, { "ncValue": "ncValue"; "ncStartValue": "ncStartValue"; "ncDelay": "ncDelay"; "ncDecimalPlaces": "ncDecimalPlaces"; "ncDuration": "ncDuration"; "ncStartOnView": "ncStartOnView"; "ncOnce": "ncOnce"; }, {}, never, never>;
}