UNPKG

@aplus-frontend/ui

Version:

175 lines (174 loc) 3.94 kB
import { TooltipProps } from '@aplus-frontend/antdv/es/tooltip/Tooltip'; import { VNode } from 'vue'; /** * Tooltip 需要的属性 */ export type TooltipNeedProps = Partial<Pick<TooltipProps, 'title' | 'align' | 'arrowPointAtCenter' | 'arrow' | 'autoAdjustOverflow' | 'color' | 'destroyTooltipOnHide' | 'getPopupContainer' | 'mouseEnterDelay' | 'mouseLeaveDelay' | 'overlayClassName' | 'overlayStyle' | 'overlayInnerStyle' | 'placement' | 'trigger'>>; /** * 健值对 */ export interface ApLadderLabelValue { /** * 健名称 */ label?: string; /** * 值 */ value?: string | number | VNode | (() => VNode) | null; /** * 是否采用原始值 */ rawValue?: boolean; /** * 精度 默认2位小数 */ precision?: number; /** * 千分位展示 */ thousand?: boolean; /** * 千分位分隔符 */ thousandSeparator?: string; /** * 货币单位 */ currency?: CurrencyCode; /** * 百分比展示 */ percent?: boolean; /** * 自定义单位 */ unit?: string; /** * 自定义单位颜色 */ unitColor?: string; /** * 自定义健颜色 */ labelColor?: string; /** * 自定义值颜色 */ valueColor?: string; /** * 跳转第三方链接 */ link?: string; /** * 自定义链接颜色 */ linkColor?: string; /** * 跳转第三方链接 - 回调 */ handleClickLink?: () => void; /** * value值-点击事件 */ handleValueClick?: (labelValueRecord: ApLadderLabelValue[]) => void; /** * label 标签的文本对齐方式 仅支持健值对(labelValues)类型 * @default `left` */ labelAlign?: 'left' | 'right'; } /** * ApLadder Props 属性类型声明 */ export interface ApLadderProps { /** * 重要信息 * @description 如 操作人名称、供应商名称... */ major?: string; /** * 次要信息 * @description 如 操作人邮箱、供应商编码... */ minor?: string; /** * 自定义重要信息颜色 * @deprecated 注意:v0.4.7版本之后就别用这个属性了 后面将不再支持 * @description 请使用`majorStyles`代替 */ majorColor?: string; /** * 自定义次要信息颜色 * @deprecated 注意:v0.4.7版本之后就别用这个属性了 后面将不再支持 * @description 请使用`minorStyles`代替 */ minorColor?: string; /** * 布局方式 * - `vertical` 垂直布局 * - `horizontal` 水平布局 * @default `vertical` */ layout?: 'vertical' | 'horizontal'; /** * 健值对 - 数组展示 */ labelValues?: Array<ApLadderLabelValue>; /** * label 标签的文本对齐方式 仅支持健值对(labelValues)类型 * @default `left` * @since v0.4.7 新增 */ labelAlign?: 'left' | 'right'; } /** * ApLadder Slots 类型声明 */ export interface ApLadderSlots { title?: VNode; } /** * 国际货币代码-映射-语言 */ export interface CurrencyCodeInLocale { [string: string]: Intl.LocalesArgument; } /** * 国际货币代码 * - `CNY` 人民币 * - `USD` 美元 * - `EUR` 欧元 * - `GBP` 英镑 */ export type CurrencyCode = 'CNY' | 'USD' | 'EUR' | 'GBP'; /** * 国际货币代码-映射-语言 */ export declare const locales: CurrencyCodeInLocale; export interface ConvertValueOptions { /** * 是否采用原始值 */ rawValue?: boolean; /** * 精度 默认2位小数 */ precision?: number; /** * 千分位展示 */ thousand?: boolean; /** * 千分位分隔符 */ thousandSeparator?: string; /** * 货币单位 */ currency?: CurrencyCode; /** * 百分比展示 */ percent?: boolean; }