ng-cw-v12
Version:
Angular UI Component Library
34 lines (33 loc) • 1.38 kB
TypeScript
import { ElementRef, Renderer2, OnInit } from '@angular/core';
import * as i0 from "@angular/core";
export declare type NcPositionType = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
export declare class RibbonDirective implements OnInit {
private el;
private renderer;
/** 丝带内容 */
ncContent: string;
/** 内容颜色 */
ncContentColor: string;
/** 大小,容器宽高较小值的百分比 */
ncSize: number;
/** 丝带颜色,需传入十六进制颜色值 */
ncRibbonColor: string;
/** 丝带位置 */
ncPosition: NcPositionType;
private ribbonContainer;
private ribbonSize;
private uniqueId;
constructor(el: ElementRef, renderer: Renderer2);
ngOnInit(): void;
private createRibbonContainer;
private updateRibbonSize;
private updateRibbonStyles;
private adjustColor;
private getRotationDegree;
private getTextRotation;
private getRibbonShadow;
private getShadowPosition;
private observeParentSize;
static ɵfac: i0.ɵɵFactoryDeclaration<RibbonDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<RibbonDirective, "[ncRibbon]", never, { "ncContent": "ncContent"; "ncContentColor": "ncContentColor"; "ncSize": "ncSize"; "ncRibbonColor": "ncRibbonColor"; "ncPosition": "ncPosition"; }, {}, never>;
}