ng-cw-v12
Version:
Angular UI Component Library
46 lines (45 loc) • 2.19 kB
TypeScript
import { ElementRef, OnInit, SimpleChanges, OnChanges, OnDestroy, Renderer2 } from '@angular/core';
import * as i0 from "@angular/core";
export declare type NcTypeType = 'underline' | 'box' | 'circle' | 'highlight' | 'strike-through' | 'crossed-off' | 'bracket';
export declare type NcBracketType = 'left' | 'right' | 'top' | 'bottom';
export declare class HighlighterDirective implements OnInit, OnChanges, OnDestroy {
private el;
private renderer;
/** 荧光笔类型 */
ncType: NcTypeType;
/** 是否开启动画效果 */
private _animate;
set ncAnimate(val: boolean | string);
get ncAnimate(): boolean;
/** 动画持续时间,单位ms */
ncAnimationDuration: number;
/** 荧光笔颜色 */
ncColor: string;
/** 荧光笔宽度,单位px */
ncStrokeWidth: number;
/** 荧光笔内边距,单位px */
ncPadding: number | [number, number] | [number, number, number, number];
/** 动画迭代次数 */
ncIterations: number;
/** 括号类型,仅当ncType为bracket时有效 */
ncBrackets: NcBracketType | NcBracketType[];
/** 动画默认从左往右绘制,若要从右往左绘制请设置成true */
private _rtl;
set ncRtl(val: boolean | string);
get ncRtl(): boolean;
/** 可手动切换该值来显示或隐藏荧光笔 */
private _enabled;
set ncEnabled(val: boolean | string);
get ncEnabled(): boolean;
private annotation;
private isInitialized;
constructor(el: ElementRef, renderer: Renderer2);
ngOnInit(): void;
ngOnDestroy(): void;
ngOnChanges(changes: SimpleChanges): void;
create(): void;
show(): void;
hide(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<HighlighterDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<HighlighterDirective, "[ncHighlighter]", never, { "ncType": "ncType"; "ncAnimate": "ncAnimate"; "ncAnimationDuration": "ncAnimationDuration"; "ncColor": "ncColor"; "ncStrokeWidth": "ncStrokeWidth"; "ncPadding": "ncPadding"; "ncIterations": "ncIterations"; "ncBrackets": "ncBrackets"; "ncRtl": "ncRtl"; "ncEnabled": "ncEnabled"; }, {}, never>;
}