UNPKG

ngx-pluto

Version:
67 lines (66 loc) 2.44 kB
import { OnInit } from "@angular/core"; /** * 盒子组件 - 常用于展示汇总数据等的面板 * * <example-url>https://stackblitz.com/edit/np-box-sample?embed=1&file=src/app/app.component.html</example-url> */ export declare class NpBox implements OnInit { /**输入参数选项 */ options: NpBoxOptions; private npBoxHeader; private defaultBgColors; showCustomHoverColor: boolean; constructor(); ngOnInit(): void; private initOptions; private buildCustomBg; /** * 构建NpBoxOptions中设置的鼠标hover颜色hoverColor * @param isHover 鼠标是否hover */ buildCustomHoverColor(isHover: boolean): void; } /** * @ignore */ export interface NpBoxOptions { /** * 'blue' | 'green' | 'red' | 'orange' 默认提供四种头部背景颜色 * 另外也可以直接传背景图片url或者其他颜色 * default = 'blue' */ bg?: string; /**头部的标题文字 */ title: string; /**头部标题icon */ faIcon: string; /** * 当传入的不是默认的四种颜色值之一的时候需要提供hover的阴影颜色,只支持传入rgb颜色值,eg. '100, 100, 100' */ hoverColor?: string; /** * box内容布局:左右布局 | 居中布局 | 自定义布局 * default = 'center' */ layout?: 'leftRight' | 'center' | 'custom'; /**内容部分的高度像素, 如传入'300'则为300px */ height?: string; /**如果内容部分为左右布局,则此参数为左边标题 */ lCaption?: string; /**如果内容部分为左右布局,则此参数为左边内容 */ lContent?: any; /**如果内容部分为左右布局,则此参数为左边内容文字颜色 */ lColor?: string; /**如果内容部分为左右布局,则此参数为右边标题 */ rCaption?: string; /**如果内容部分为左右布局,则此参数为右边内容 */ rContent?: any; /**如果内容部分为左右布局,则此参数为右边内容文字颜色 */ rColor?: string; /**如果内容部分为居中布局,则此参数为居中内容标题 */ cCaption?: string; /**如果内容部分为居中布局,则此参数为居中内容 */ cContent?: any; /**如果内容部分为居中布局,则此参数为居中内容文字颜色 */ cColor?: string; }